]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
code before decl
authorJeff Lenk <jeff@jefflenk.com>
Wed, 11 Nov 2009 04:29:17 +0000 (04:29 +0000)
committerJeff Lenk <jeff@jefflenk.com>
Wed, 11 Nov 2009 04:29:17 +0000 (04:29 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@15425 d0543943-73ff-0310-b7d9-9358b9ac24b2

src/mod/endpoints/mod_sofia/mod_sofia.c

index f733afb22d9cc435d48a68bc7f1ba7658923cc9e..5b272cd040d1d8795cd94f2313120563a34dec32 100644 (file)
@@ -1167,6 +1167,7 @@ static switch_status_t sofia_receive_message(switch_core_session_t *session, swi
        case SWITCH_MESSAGE_INDICATE_ANSWER:
        case SWITCH_MESSAGE_INDICATE_PROGRESS:
                {
+                       const char *var;
                        const char *presence_data = switch_channel_get_variable(channel, "presence_data");
                        const char *presence_id = switch_channel_get_variable(channel, "presence_id");
                        char *sql;
@@ -1180,7 +1181,7 @@ static switch_status_t sofia_receive_message(switch_core_session_t *session, swi
                        switch_assert(sql);
                        sofia_glue_execute_sql(tech_pvt->profile, &sql, SWITCH_TRUE);
 
-                       const char *var;
+
                        if ((var = switch_channel_get_variable(channel, SOFIA_SECURE_MEDIA_VARIABLE)) && switch_true(var)) {
                                sofia_set_flag_locked(tech_pvt, TFLAG_SECURE);
                        }