]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
FS-7911 #resolve
authorAnthony Minessale <anthm@freeswitch.org>
Wed, 23 Sep 2015 16:58:57 +0000 (11:58 -0500)
committerAnthony Minessale <anthm@freeswitch.org>
Thu, 24 Sep 2015 21:02:56 +0000 (16:02 -0500)
Conflicts:
src/mod/endpoints/mod_sofia/mod_sofia.c

src/mod/endpoints/mod_sofia/mod_sofia.c
src/mod/endpoints/mod_sofia/sofia_glue.c

index ab3b10992434c65673c4f40d1f0ccaa100c160e6..9fa263b1e2ded6a4fc0fef377edac247e6a4efb8 100644 (file)
@@ -1503,11 +1503,6 @@ static switch_status_t sofia_receive_message(switch_core_session_t *session, swi
                                break;
                        }
 
-                       if (!zstr(msg->string_array_arg[0]) && !zstr(msg->string_array_arg[1])) {
-                               ct = switch_core_session_sprintf(session, "%s/%s", msg->string_array_arg[0], msg->string_array_arg[1]);
-                               ok = 1;
-                       }
-
                        if (switch_stristr("send_message", tech_pvt->x_freeswitch_support_remote)) {
                                ok = 1;
                        }
@@ -1519,6 +1514,10 @@ static switch_status_t sofia_receive_message(switch_core_session_t *session, swi
                        if (ok) {
                                const char *pl = NULL;
 
+                               if (!zstr(msg->string_array_arg[0]) && !zstr(msg->string_array_arg[1])) {
+                                       switch_snprintf(ct, sizeof(ct), "%s/%s", msg->string_array_arg[0], msg->string_array_arg[1]);
+                               }
+
                                if (!zstr(msg->string_array_arg[2])) {
                                        pl = msg->string_array_arg[2];
                                }
index 8e99457f881db6c150bfe43c9381caf2c1261ecb..9d4b5f95220fb0a8399dd5983137207bc4b40609 100644 (file)
@@ -620,7 +620,7 @@ void sofia_glue_set_extra_headers(switch_core_session_t *session, sip_t const *s
        sip_unknown_t *un;
        char name[512] = "";
        switch_channel_t *channel = switch_core_session_get_channel(session);
-       char *pstr;
+       char pstr[32];
 
        
        if (!sip || !channel) {
@@ -636,7 +636,7 @@ void sofia_glue_set_extra_headers(switch_core_session_t *session, sip_t const *s
                }
        }
 
-       pstr = switch_core_session_sprintf(session, "execute_on_%sprefix", prefix);
+       switch_snprintf(pstr, sizeof(pstr), "execute_on_%sprefix", prefix);
        switch_channel_execute_on(channel, pstr);
        switch_channel_api_on(channel, pstr);