From: Mark Spencer Date: Tue, 31 Aug 2004 17:30:46 +0000 (+0000) Subject: When queueing frames, it's pointless to queue a frame after a HANGUP frame is queued... X-Git-Tag: 1.0.0~129 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1db964ad9571f2bb3803e8f9006c4b0046e46548;p=thirdparty%2Fasterisk.git When queueing frames, it's pointless to queue a frame after a HANGUP frame is queued... git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3697 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/channel.c b/channel.c index f770b98d64..5c3b4a137e 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++;