From: Luigi Rizzo Date: Sun, 16 Apr 2006 15:27:58 +0000 (+0000) Subject: move common code in one place X-Git-Tag: 1.4.0-beta1~1942 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9807aab4835dc68671a18513c16b4cf642b29ff1;p=thirdparty%2Fasterisk.git move common code in one place git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@20513 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/channel.c b/channel.c index b760d100ea..ca2d5225a1 100644 --- a/channel.c +++ b/channel.c @@ -3943,8 +3943,6 @@ struct ast_frame *ast_channel_spy_read_frame(struct ast_channel_spy *spy, unsign result = spy->read_queue.head; spy->read_queue.head = NULL; spy->read_queue.samples = 0; - ast_clear_flag(spy, CHANSPY_TRIGGER_FLUSH); - return result; } else { if (ast_test_flag(spy, CHANSPY_WRITE_VOLADJUST)) { for (result = spy->write_queue.head; result; result = result->next) @@ -3953,9 +3951,9 @@ struct ast_frame *ast_channel_spy_read_frame(struct ast_channel_spy *spy, unsign result = spy->write_queue.head; spy->write_queue.head = NULL; spy->write_queue.samples = 0; - ast_clear_flag(spy, CHANSPY_TRIGGER_FLUSH); - return result; } + ast_clear_flag(spy, CHANSPY_TRIGGER_FLUSH); + return result; } if ((spy->read_queue.samples < samples) || (spy->write_queue.samples < samples))