aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormarkster <markster@f38db490-d61c-443f-a65b-d21fe96a405b>2004-08-31 17:30:46 +0000
committermarkster <markster@f38db490-d61c-443f-a65b-d21fe96a405b>2004-08-31 17:30:46 +0000
commit716571570b529faaeeda6fa90b69a45e735e57be (patch)
treecdda2465107a8cc4b54ce2bafb543bf95f02971c
parentc9be894f9a4924940e96cd35d3d32f3679b71efe (diff)
When queueing frames, it's pointless to queue a frame after a HANGUP frame is queued...
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@3697 f38db490-d61c-443f-a65b-d21fe96a405b
-rwxr-xr-xchannel.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/channel.c b/channel.c
index f770b98d6..5c3b4a137 100755
--- a/channel.c
+++ b/channel.c
@@ -383,6 +383,12 @@ int ast_queue_frame(struct ast_channel *chan, struct ast_frame *fin)
prev = NULL;
cur = chan->pvt->readq;
while(cur) {
+ if ((cur->frametype == AST_FRAME_CONTROL) && (cur->subclass == AST_CONTROL_HANGUP)) {
+ /* Don't bother actually queueing anything after a hangup */
+ ast_frfree(f);
+ ast_mutex_unlock(&chan->lock);
+ return 0;
+ }
prev = cur;
cur = cur->next;
qlen++;