aboutsummaryrefslogtreecommitdiffstats
path: root/channels/chan_agent.c
diff options
context:
space:
mode:
authormmichelson <mmichelson@f38db490-d61c-443f-a65b-d21fe96a405b>2008-09-05 21:12:09 +0000
committermmichelson <mmichelson@f38db490-d61c-443f-a65b-d21fe96a405b>2008-09-05 21:12:09 +0000
commit2b7bc566425f27ab8e61c391b8ebbcd0f64d9eab (patch)
treeef4e5e9fd8d66c8cef455f07670931797c5aa30d /channels/chan_agent.c
parent7fd9e30c2a17e3a65260c04fbda5575257a242cc (diff)
Merged revisions 141366 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r141366 | mmichelson | 2008-09-05 16:10:32 -0500 (Fri, 05 Sep 2008) | 7 lines 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 ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@141367 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channels/chan_agent.c')
-rw-r--r--channels/chan_agent.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/channels/chan_agent.c b/channels/chan_agent.c
index ee02f9021..5f5afbd43 100644
--- a/channels/chan_agent.c
+++ b/channels/chan_agent.c
@@ -655,7 +655,7 @@ static int agent_indicate(struct ast_channel *ast, int condition, const void *da
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;