diff options
author | Olle Johansson <oej@edvina.net> | 2006-01-24 20:41:08 +0000 |
---|---|---|
committer | Olle Johansson <oej@edvina.net> | 2006-01-24 20:41:08 +0000 |
commit | 3fbad3f5d37f9ac5f80b23c6e58bf9b6cc771d69 (patch) | |
tree | 218092abe42f2f13e37463359fa97cc3f82b769a /channels | |
parent | 6334e3b543d20da522f91095b63c690060569e5e (diff) |
Don't reset scheduled ID until we actually end the scheduled event.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@8574 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'channels')
-rw-r--r-- | channels/chan_sip.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c index 3deb2158a..f2ed1f6ce 100644 --- a/channels/chan_sip.c +++ b/channels/chan_sip.c @@ -1321,7 +1321,6 @@ static int __sip_autodestruct(void *data) { struct sip_pvt *p = data; - p->autokillid = -1; /* If this is a subscription, tell the phone that we got a timeout */ if (p->subscribed) { @@ -1329,9 +1328,16 @@ static int __sip_autodestruct(void *data) transmit_state_notify(p, AST_EXTENSION_DEACTIVATED, 1, 1); /* Send first notification */ p->subscribed = NONE; append_history(p, "Subscribestatus", "timeout"); + if (option_debug > 2) + ast_log(LOG_DEBUG, "Re-scheduled destruction of SIP subsription %s\n", p->callid ? p->callid : "<unknown>"); return 10000; /* Reschedule this destruction so that we know that it's gone */ } - ast_log(LOG_DEBUG, "Auto destroying call '%s'\n", p->callid); + + /* Reset schedule ID */ + p->autokillid = -1; + + if (option_debug) + ast_log(LOG_DEBUG, "Auto destroying call '%s'\n", p->callid); append_history(p, "AutoDestroy", ""); if (p->owner) { ast_log(LOG_WARNING, "Autodestruct on dialog '%s' with owner in place (Method: %s)\n", p->callid, sip_methods[p->method].text); |