diff options
author | Olle Johansson <oej@edvina.net> | 2006-01-26 14:44:23 +0000 |
---|---|---|
committer | Olle Johansson <oej@edvina.net> | 2006-01-26 14:44:23 +0000 |
commit | ca81ac1a024e0257718fafe05ebfee2b8e317ed9 (patch) | |
tree | e4744500960fb1d9720b17dfa629539447d0e1d9 /channels | |
parent | 4467ab62c857cd3c7bdaac3e75536aad7a13c7b8 (diff) |
Merged revisions 8710 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2
........
r8710 | oej | 2006-01-26 15:39:36 +0100 (Thu, 26 Jan 2006) | 2 lines
Issue 5898: Registrations does not get deleted if there's an active SIP dialog
........
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@8711 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'channels')
-rw-r--r-- | channels/chan_sip.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c index 845769dfe..dc6f3f38c 100644 --- a/channels/chan_sip.c +++ b/channels/chan_sip.c @@ -13041,6 +13041,19 @@ static int sip_do_reload(enum channelreloadreason reason) 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(®l, 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(®l, sip_registry_destroy); ASTOBJ_CONTAINER_MARKALL(&peerl); |