]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
automerge commit
authorAutomerge script <automerge@asterisk.org>
Thu, 26 Jan 2006 15:01:17 +0000 (15:01 +0000)
committerAutomerge script <automerge@asterisk.org>
Thu, 26 Jan 2006 15:01:17 +0000 (15:01 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@8721 65c4cc65-6c06-0410-ace0-fbb531ad65f3

channels/chan_sip.c

index 56914677bacca34c413df67f505f097642ec5c15..5d5206567f10b8f9013c6eaa8163e0dc16825d57 100644 (file)
@@ -13151,6 +13151,19 @@ static int sip_do_reload(void)
        clear_sip_domains();
        authl = NULL;
 
+       /* First, destroy all outstanding registry calls */
+       /* This is needed, since otherwise active registry entries will not be destroyed */
+       ASTOBJ_CONTAINER_TRAVERSE(&regl, 1, do {
+               ASTOBJ_RDLOCK(iterator);
+               if (iterator->call) {
+                       if (option_debug > 2)
+                               ast_log(LOG_DEBUG, "Destroying active SIP dialog for registry %s@%s\n", iterator->username, iterator->hostname);
+                       /* This will also remove references to the registry */
+                       sip_destroy(iterator->call);
+               }
+               ASTOBJ_UNLOCK(iterator);
+       } while(0));
+
        ASTOBJ_CONTAINER_DESTROYALL(&userl, sip_destroy_user);
        ASTOBJ_CONTAINER_DESTROYALL(&regl, sip_registry_destroy);
        ASTOBJ_CONTAINER_MARKALL(&peerl);