aboutsummaryrefslogtreecommitdiffstats
path: root/channels
diff options
context:
space:
mode:
authormarkster <markster@f38db490-d61c-443f-a65b-d21fe96a405b>2006-03-09 12:28:07 +0000
committermarkster <markster@f38db490-d61c-443f-a65b-d21fe96a405b>2006-03-09 12:28:07 +0000
commit7d2a032ec04eba11396818f7b4150bfb6a97b660 (patch)
tree8de0a64f63001804ad02afd3b6f004dde3de8b12 /channels
parenteb6b8e6e0b349eb5001fe448fa5882126af6863a (diff)
Make sure we clear our sched value before we actually schedule the
dereg. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@12476 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channels')
-rw-r--r--channels/chan_iax2.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/channels/chan_iax2.c b/channels/chan_iax2.c
index a52e16821..64165edb0 100644
--- a/channels/chan_iax2.c
+++ b/channels/chan_iax2.c
@@ -5759,8 +5759,6 @@ static void __expire_registry(void *data)
ast_log(LOG_DEBUG, "Expiring registration for peer '%s'\n", p->name);
/* Reset the address */
memset(&p->addr, 0, sizeof(p->addr));
- /* Reset expire notice */
- p->expire = -1;
/* Reset expiry value */
p->expiry = min_reg_expire;
if (!ast_test_flag(p, IAX_TEMPONLY))
@@ -5778,6 +5776,9 @@ static void __expire_registry(void *data)
static int expire_registry(void *data)
{
+ struct iax2_peer *p = data;
+ /* Reset expire notice */
+ p->expire = -1;
#ifdef SCHED_MULTITHREADED
if (schedule_action(__expire_registry, data))
#endif