]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
fix build
authorAnthony Minessale <anthm@freeswitch.org>
Thu, 10 Nov 2011 15:46:56 +0000 (09:46 -0600)
committerAnthony Minessale <anthm@freeswitch.org>
Thu, 10 Nov 2011 15:46:56 +0000 (09:46 -0600)
src/mod/endpoints/mod_sofia/mod_sofia.h
src/mod/endpoints/mod_sofia/sofia_reg.c

index 318ecea2cec5b213caee3a901d35ae8b069032a9..df207fea32346518d636329643585336e8237a56 100644 (file)
@@ -473,6 +473,7 @@ struct sofia_gateway {
        int32_t retry_seconds;
        int32_t reg_timeout_seconds;
        int32_t failure_status;
+       sub_state_t sub_state;
        reg_state_t state;
        switch_memory_pool_t *pool;
        int deleted;
index 6107817d51967b75dea11e2597202edc256827e2..9aa31ae1ba14df27736dd9cb7f2baf95d31696a8 100644 (file)
@@ -110,7 +110,7 @@ static void sofia_reg_kill_sub(sofia_gateway_t *gateway_ptr)
                nua_handle_bind(gateway_ptr->sub_nh, NULL);
        }
 
-       if (gateway_ptr->state != SUB_STATE_SUBED && gateway_ptr->state != SUB_STATE_UNSUBSCRIBE) {
+       if (gateway_ptr->sub_state != SUB_STATE_SUBED && gateway_ptr->sub_state != SUB_STATE_UNSUBSCRIBE) {
                if (gateway_ptr->sub_nh) {
                        nua_handle_destroy(gateway_ptr->sub_nh);
                        gateway_ptr->sub_nh = NULL;
@@ -213,6 +213,8 @@ void sofia_sub_check_gateway(sofia_profile_t *profile, time_t now)
                                gw_sub_ptr->expires_str = "0";
                        }
 
+                       gateway_ptr->sub_state = gw_sub_ptr->state;
+
                        switch (ostate) {
                        case SUB_STATE_NOSUB:
                                break;