]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
dont send blank update
authorAnthony Minessale <anthony.minessale@gmail.com>
Thu, 5 Nov 2009 06:51:51 +0000 (06:51 +0000)
committerAnthony Minessale <anthony.minessale@gmail.com>
Thu, 5 Nov 2009 06:51:51 +0000 (06:51 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@15366 d0543943-73ff-0310-b7d9-9358b9ac24b2

src/mod/endpoints/mod_sofia/sofia.c

index b58895626231ae6d0e4c5855fe06aec09e7b7c0c..96bef028bda6ba78bfd74c13e45c922abd82235c 100644 (file)
@@ -479,7 +479,11 @@ void sofia_update_callee_id(switch_core_session_t *session, sofia_profile_t *pro
                number = tmp;
        }
 
-       if (!name) name = (char *) number;
+       if (zstr(name)) name = (char *) number;
+
+       if (zstr(name) || zstr(number)) {
+               goto end;
+       }
 
        if (switch_event_create(&event, SWITCH_EVENT_CALL_UPDATE) == SWITCH_STATUS_SUCCESS) {
                const char *uuid = switch_channel_get_variable(channel, SWITCH_SIGNAL_BOND_VARIABLE);
@@ -503,6 +507,7 @@ void sofia_update_callee_id(switch_core_session_t *session, sofia_profile_t *pro
                sofia_send_callee_id(session, NULL, NULL);
        }
 
+ end:
        switch_safe_free(dup);
 }