summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoshua Colp <jcolp@digium.com>2006-06-12 02:54:32 +0000
committerJoshua Colp <jcolp@digium.com>2006-06-12 02:54:32 +0000
commitce311227ac7f8a9b9bc00d5cb0c291357447f71e (patch)
tree3b2b061039c980240ea687bd746114bad9a9fba4
parent1b85726c28efdd09039680d406d4a96e0a4dc604 (diff)
Change a bit of logic in peer expiry back to the way it used to be
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@33595 65c4cc65-6c06-0410-ace0-fbb531ad65f3
-rw-r--r--channels/chan_iax2.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/channels/chan_iax2.c b/channels/chan_iax2.c
index 87c665fb7..27560a29b 100644
--- a/channels/chan_iax2.c
+++ b/channels/chan_iax2.c
@@ -5518,9 +5518,6 @@ static void __expire_registry(void *data)
AST_LIST_LOCK(&peers);
AST_LIST_TRAVERSE_SAFE_BEGIN(&peers, p, entry) {
if (!strcasecmp(p->name, name)) {
- /* If we are set to auto clear then remove ourselves */
- if (ast_test_flag(p, IAX_RTAUTOCLEAR))
- AST_LIST_REMOVE_CURRENT(&peers, entry);
p->expire = -1;
break;
}
@@ -5546,8 +5543,8 @@ static void __expire_registry(void *data)
iax2_regfunk(p->name, 0);
if (ast_test_flag(p, IAX_RTAUTOCLEAR)) {
- /* We are already gone from the list, so we can just destroy ourselves */
- destroy_peer(p);
+ ast_set_flag(p, IAX_DELME);
+ prune_peers();
}
}