]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
FS-3596 --resolve
authorAnthony Minessale <anthm@freeswitch.org>
Wed, 5 Oct 2011 18:55:16 +0000 (13:55 -0500)
committerAnthony Minessale <anthm@freeswitch.org>
Wed, 5 Oct 2011 18:55:20 +0000 (13:55 -0500)
src/mod/endpoints/mod_sofia/sofia_reg.c

index bccae9293f664877a36747d28274399b5f296eb0..4978815f98c6eb01937fe4624f6efcf219a5912d 100644 (file)
@@ -72,7 +72,7 @@ static void sofia_reg_kill_reg(sofia_gateway_t *gateway_ptr)
                nua_handle_bind(gateway_ptr->nh, NULL);
        }
 
-       if (gateway_ptr->state != REG_STATE_REGED) {
+       if (gateway_ptr->state != REG_STATE_REGED && gateway_ptr->state != REG_STATE_UNREGISTER) {
                if (gateway_ptr->nh) {
                        nua_handle_destroy(gateway_ptr->nh);
                        gateway_ptr->nh = NULL;