[asterisk-commits] mmichelson: branch 1.4 r141366 - /branches/1.4/channels/chan_agent.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Fri Sep 5 16:10:32 CDT 2008


Author: mmichelson
Date: Fri Sep  5 16:10:32 2008
New Revision: 141366

URL: http://svn.digium.com/view/asterisk?view=rev&rev=141366
Log:
Agent's should not try to call a channel's indicate callback
if the channel has been hung up. It will likely crash
otherwise

ABE-1159


Modified:
    branches/1.4/channels/chan_agent.c

Modified: branches/1.4/channels/chan_agent.c
URL: http://svn.digium.com/view/asterisk/branches/1.4/channels/chan_agent.c?view=diff&rev=141366&r1=141365&r2=141366
==============================================================================
--- branches/1.4/channels/chan_agent.c (original)
+++ branches/1.4/channels/chan_agent.c Fri Sep  5 16:10:32 2008
@@ -666,7 +666,7 @@
 	struct agent_pvt *p = ast->tech_pvt;
 	int res = -1;
 	ast_mutex_lock(&p->lock);
-	if (p->chan)
+	if (p->chan && !ast_check_hangup(p->chan))
 		res = p->chan->tech->indicate ? p->chan->tech->indicate(p->chan, condition, data, datalen) : -1;
 	else
 		res = 0;




More information about the asterisk-commits mailing list