]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
code before declaration.
authorMichael Jerris <mike@jerris.com>
Sun, 21 Oct 2007 20:48:50 +0000 (20:48 +0000)
committerMichael Jerris <mike@jerris.com>
Sun, 21 Oct 2007 20:48:50 +0000 (20:48 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@6013 d0543943-73ff-0310-b7d9-9358b9ac24b2

src/mod/applications/mod_voicemail/mod_voicemail.c
src/mod/endpoints/mod_sofia/sofia.c

index b2fe388fd6c22ddab42296409751131d04612579..a28c5b52c6bb29ccfb7ba276e728c15aa73e86c4 100644 (file)
@@ -1311,6 +1311,7 @@ static void voicemail_check_main(switch_core_session_t *session, char *profile_n
                 }
 
                 if (!x_user) {
+                                       char *xtra;
                     int ok = 1;
                     /* TRX added destination_number and caller_id_number from the session object
                      * ideally switch_xml_* would do this for any curl request, but that can get tricky
@@ -1318,7 +1319,7 @@ static void voicemail_check_main(switch_core_session_t *session, char *profile_n
                      * and see what it would take to make it automagically do that
                      */
                     caller_profile = switch_channel_get_caller_profile(channel);
-                    char *xtra = switch_mprintf("mailbox=%s&destination_number=%s&caller_id_number=%s", myid,caller_profile->destination_number,caller_profile->caller_id_number);
+                    xtra = switch_mprintf("mailbox=%s&destination_number=%s&caller_id_number=%s", myid,caller_profile->destination_number,caller_profile->caller_id_number);
                     
                     assert(xtra);
 
index 7e3ba94267ac8e6eaf13cf08daaa8a6754d7b110..d255947fbe5f8879bbc7abd3bb5741026dab0683 100644 (file)
@@ -2073,9 +2073,10 @@ void sofia_handle_sip_i_invite(nua_t *nua, sofia_profile_t *profile, nua_handle_
 
        if (sip->sip_request->rq_url) {
                sofia_gateway_t *gateway;
+               char *from_key;
                char *user = (char *) sip->sip_request->rq_url->url_user;
                check_decode(user, session);
-               char *from_key = switch_core_session_sprintf(session, "sip:%s@%s",
+               from_key = switch_core_session_sprintf(session, "sip:%s@%s",
                                                                                                         user,
                                                                                                         (char *) sip->sip_request->rq_url->url_host);