[svn-commits] trunk - r8574 /trunk/channels/chan_sip.c

svn-commits at lists.digium.com svn-commits at lists.digium.com
Tue Jan 24 13:41:10 MST 2006


Author: oej
Date: Tue Jan 24 14:41:08 2006
New Revision: 8574

URL: http://svn.digium.com/view/asterisk?rev=8574&view=rev
Log:
Don't reset scheduled ID until we actually end the scheduled event.

Modified:
    trunk/channels/chan_sip.c

Modified: trunk/channels/chan_sip.c
URL: http://svn.digium.com/view/asterisk/trunk/channels/chan_sip.c?rev=8574&r1=8573&r2=8574&view=diff
==============================================================================
--- trunk/channels/chan_sip.c (original)
+++ trunk/channels/chan_sip.c Tue Jan 24 14:41:08 2006
@@ -1321,7 +1321,6 @@
 {
 	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 @@
 		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);



More information about the svn-commits mailing list