]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
add another destroy case for notify packets
authorAnthony Minessale <anthony.minessale@gmail.com>
Wed, 1 Apr 2009 16:53:04 +0000 (16:53 +0000)
committerAnthony Minessale <anthony.minessale@gmail.com>
Wed, 1 Apr 2009 16:53:04 +0000 (16:53 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@12867 d0543943-73ff-0310-b7d9-9358b9ac24b2

src/mod/endpoints/mod_sofia/sofia.c

index 6ae6e579aedd4bb260c7e1baf674d14ecd0c245e..7250dd8ba7784d0a778d31602d1eceda6d30c1fe 100644 (file)
@@ -539,6 +539,11 @@ void sofia_event_callback(nua_event_t event,
                break;
        }
 
+       if ((sofia_private && sofia_private == &mod_sofia_globals.destroy_private) || (status >= 300 && status != 401 && status != 407)) {
+               nua_handle_bind(nh, NULL);
+               nua_handle_destroy(nh);
+               nh = NULL;
+       }
 
        if (check_destroy) {
                if (nh && ((sofia_private && sofia_private->destroy_nh) || !nua_handle_magic(nh))) {