[asterisk-commits] russell: trunk r73771 - in /trunk: ./ channels/chan_sip.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Fri Jul 6 18:05:24 CDT 2007


Author: russell
Date: Fri Jul  6 18:05:24 2007
New Revision: 73771

URL: http://svn.digium.com/view/asterisk?view=rev&rev=73771
Log:
Merged revisions 73769 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.4

................
r73769 | russell | 2007-07-06 18:02:58 -0500 (Fri, 06 Jul 2007) | 12 lines

Merged revisions 73768 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r73768 | russell | 2007-07-06 18:01:22 -0500 (Fri, 06 Jul 2007) | 4 lines

If a sip_pvt struct has already registered an extension state callback,
remove the old one before adding a new one.  If this isn't done, Asterisk
will crash.  (issue #10120)

........

................

Modified:
    trunk/   (props changed)
    trunk/channels/chan_sip.c

Propchange: trunk/
------------------------------------------------------------------------------
Binary property 'branch-1.4-merged' - no diff available.

Modified: trunk/channels/chan_sip.c
URL: http://svn.digium.com/view/asterisk/trunk/channels/chan_sip.c?view=diff&rev=73771&r1=73770&r2=73771
==============================================================================
--- trunk/channels/chan_sip.c (original)
+++ trunk/channels/chan_sip.c Fri Jul  6 18:05:24 2007
@@ -15400,8 +15400,11 @@
 	}
 
 	/* Add subscription for extension state from the PBX core */
-	if (p->subscribed != MWI_NOTIFICATION && !resubscribe)
+	if (p->subscribed != MWI_NOTIFICATION && !resubscribe) {
+		if (p->stateid > -1)
+			ast_extension_state_del(p->stateid, cb_extensionstate);
 		p->stateid = ast_extension_state_add(p->context, p->exten, cb_extensionstate, p);
+	}
 
 	if (!ast_test_flag(req, SIP_PKT_IGNORE) && p)
 		p->lastinvite = seqno;




More information about the asterisk-commits mailing list