]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
avoid (null) confusion
authorMathieu Rene <mrene@avgs.ca>
Sat, 7 Mar 2009 06:50:10 +0000 (06:50 +0000)
committerMathieu Rene <mrene@avgs.ca>
Sat, 7 Mar 2009 06:50:10 +0000 (06:50 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@12499 d0543943-73ff-0310-b7d9-9358b9ac24b2

src/switch_xml_config.c

index d6be31b1b679cc32bf52e8118e1c0be1eb8f74b5..a33f0f244a851575471c472c89a41afc4a8b169c 100644 (file)
@@ -215,8 +215,12 @@ SWITCH_DECLARE(switch_status_t) switch_xml_config_parse_event(switch_event_t *ev
                                                                newstring = value; /* Regex match, accept value*/
                                                        } else {
                                                                newstring = (char*)item->defaultvalue;  /* Regex failed */
-                                                               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Invalid value [%s] for parameter [%s], setting default [%s]\n", 
-                                                                       value, item->key, newstring ? newstring : "(null)");
+                                                               if (newstring) {
+                                                                       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Invalid value [%s] for parameter [%s], setting default [%s]\n", 
+                                                                               value, item->key, newstring);
+                                                               } else {
+                                                                       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Invalid value [%s] for parameter [%s]\n", value, item->key);
+                                                               }
                                                                switch_xml_config_item_print_doc(SWITCH_LOG_ERROR, item);
                                                        }
                                                } else {