[asterisk-commits] mmichelson: branch 1.6.1 r143611 - in /branches/1.6.1: ./ channels/chan_agent.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Fri Sep 19 10:49:19 CDT 2008


Author: mmichelson
Date: Fri Sep 19 10:49:19 2008
New Revision: 143611

URL: http://svn.digium.com/view/asterisk?view=rev&rev=143611
Log:
Merged revisions 143609 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/trunk

........
r143609 | mmichelson | 2008-09-19 10:43:28 -0500 (Fri, 19 Sep 2008) | 11 lines

We should only unsubscribe to the device state event
subscription if we have previously subscribed. Otherwise
a segfault will occur.

(closes issue #13476)
Reported by: jonnt
Patches:
      13476.patch uploaded by putnopvut (license 60)
Tested by: jonnt


........

Modified:
    branches/1.6.1/   (props changed)
    branches/1.6.1/channels/chan_agent.c

Propchange: branches/1.6.1/
------------------------------------------------------------------------------
Binary property 'trunk-merged' - no diff available.

Modified: branches/1.6.1/channels/chan_agent.c
URL: http://svn.digium.com/view/asterisk/branches/1.6.1/channels/chan_agent.c?view=diff&rev=143611&r1=143610&r2=143611
==============================================================================
--- branches/1.6.1/channels/chan_agent.c (original)
+++ branches/1.6.1/channels/chan_agent.c Fri Sep 19 10:49:19 2008
@@ -2522,7 +2522,9 @@
 	/* First, take us out of the channel loop */
 	ast_channel_unregister(&agent_tech);
 	/* Delete devicestate subscription */
-	agent_devicestate_sub = ast_event_unsubscribe(agent_devicestate_sub);
+	if (agent_devicestate_sub) {
+		agent_devicestate_sub = ast_event_unsubscribe(agent_devicestate_sub);
+	}
 	/* Unregister dialplan functions */
 	ast_custom_function_unregister(&agent_function);	
 	/* Unregister CLI commands */




More information about the asterisk-commits mailing list