]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
fix small presence status bug
authorAnthony Minessale <anthm@freeswitch.org>
Mon, 13 Sep 2010 17:51:30 +0000 (12:51 -0500)
committerAnthony Minessale <anthm@freeswitch.org>
Mon, 13 Sep 2010 17:51:30 +0000 (12:51 -0500)
src/mod/endpoints/mod_sofia/sofia_presence.c

index 73d930314b55034bbd17346d77d669921bdd562b..f88920294ca8c6f9d187fb403185a7980c228b33 100644 (file)
@@ -1442,7 +1442,7 @@ static int sofia_presence_sub_callback(void *pArg, int argc, char **argv, char *
                                        op = switch_event_get_header(helper->event, "Caller-Callee-ID-Number");
                                }
 
-                               if (!op) {
+                               if (zstr(op)) {
                                        op = switch_event_get_header(helper->event, "Caller-Destination-Number");
                                }
 
@@ -1452,7 +1452,7 @@ static int sofia_presence_sub_callback(void *pArg, int argc, char **argv, char *
 
                                if (!strcmp(astate, "early")) {
                                        if (zstr(op)) {
-                                               switch_snprintf(status_line, sizeof(status_line), "%s %s", what, status);
+                                               switch_snprintf(status_line, sizeof(status_line), "%sing", what);
                                        } else {
                                                switch_snprintf(status_line, sizeof(status_line), "%s %s", what, op);
                                        }