]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
add zstr
authorAnthony Minessale <anthm@freeswitch.org>
Wed, 14 Jul 2010 22:49:44 +0000 (17:49 -0500)
committerAnthony Minessale <anthm@freeswitch.org>
Wed, 14 Jul 2010 22:49:44 +0000 (17:49 -0500)
src/mod/applications/mod_fifo/mod_fifo.c

index 0cfd2064cdc7eb585a7c3ecd45fa732f8038803c..00e28ed75f9f5dae0ae8a296dc4209c260d97ae5 100644 (file)
@@ -1011,7 +1011,7 @@ static void *SWITCH_THREAD_FUNC ringall_thread_run(switch_thread_t *thread, void
        
        if (!switch_event_get_header(ovars, "origination_caller_id_name")) {
                if ((caller_id_name = switch_event_get_header(pop, "caller-caller-id-name"))) {
-                       if (node->outbound_name) {
+                       if (!zstr(node->outbound_name)) {
                                switch_event_add_header(ovars, SWITCH_STACK_BOTTOM, "origination_caller_id_name", "(%s) %s", node->outbound_name, caller_id_name);
                        } else {
                                switch_event_add_header_string(ovars, SWITCH_STACK_BOTTOM, "origination_caller_id_name", caller_id_name);
@@ -1173,7 +1173,7 @@ static void *SWITCH_THREAD_FUNC o_thread_run(switch_thread_t *thread, void *obj)
                originate_string = switch_mprintf("{execute_on_answer='unset fifo_hangup_check',fifo_hangup_check='%q'}%s",
                                                                                  node->name, h->originate_string);
        } else {
-               if (node->outbound_name) {
+               if (!zstr(node->outbound_name)) {
                        originate_string = switch_mprintf("{execute_on_answer='unset fifo_hangup_check',fifo_hangup_check='%q',"
                                                                                          "origination_caller_id_name=Queue,origination_caller_id_number='Queue: %q'}%s",
                                                                                          node->name,  node->outbound_name, h->originate_string);
@@ -3304,7 +3304,7 @@ static switch_status_t load_config(int reload, int del_all)
                                node = create_node(name, imp, globals.sql_mutex);
                        }
 
-                       if ((val = switch_xml_attr(fifo, "outbound_name"))) {
+                       if ((val = switch_xml_attr(fifo, "outbound_name")) && !zstr(val)) {
                                node->outbound_name = switch_core_strdup(node->pool, val);
                        }