aboutsummaryrefslogtreecommitdiffstats
path: root/channels
diff options
context:
space:
mode:
authormmichelson <mmichelson@f38db490-d61c-443f-a65b-d21fe96a405b>2008-09-05 21:10:32 +0000
committermmichelson <mmichelson@f38db490-d61c-443f-a65b-d21fe96a405b>2008-09-05 21:10:32 +0000
commit4ea46731fe58ccc3644d025b0013ded24432c09c (patch)
treee7f6dae933b48204c0b0d76030a7351880e8b651 /channels
parent9310992d2f142a225b3f6efe4f4e757ba171c5d3 (diff)
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/branches/1.4@141366 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channels')
-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 46f776607..efba49e77 100644
--- a/channels/chan_agent.c
+++ b/channels/chan_agent.c
@@ -666,7 +666,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;