[asterisk-commits] russell: branch 1.4 r73769 - in /branches/1.4: ./ channels/chan_sip.c

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


Author: russell
Date: Fri Jul  6 18:02:58 2007
New Revision: 73769

URL: http://svn.digium.com/view/asterisk?view=rev&rev=73769
Log:
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:
    branches/1.4/   (props changed)
    branches/1.4/channels/chan_sip.c

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

Modified: branches/1.4/channels/chan_sip.c
URL: http://svn.digium.com/view/asterisk/branches/1.4/channels/chan_sip.c?view=diff&rev=73769&r1=73768&r2=73769
==============================================================================
--- branches/1.4/channels/chan_sip.c (original)
+++ branches/1.4/channels/chan_sip.c Fri Jul  6 18:02:58 2007
@@ -14624,8 +14624,11 @@
 		return 0;
 	}
 
-	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