mirror of
https://github.com/asterisk/asterisk.git
synced 2025-11-09 03:18:30 +00:00
move common code in one place
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@20513 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -3943,8 +3943,6 @@ struct ast_frame *ast_channel_spy_read_frame(struct ast_channel_spy *spy, unsign
|
|||||||
result = spy->read_queue.head;
|
result = spy->read_queue.head;
|
||||||
spy->read_queue.head = NULL;
|
spy->read_queue.head = NULL;
|
||||||
spy->read_queue.samples = 0;
|
spy->read_queue.samples = 0;
|
||||||
ast_clear_flag(spy, CHANSPY_TRIGGER_FLUSH);
|
|
||||||
return result;
|
|
||||||
} else {
|
} else {
|
||||||
if (ast_test_flag(spy, CHANSPY_WRITE_VOLADJUST)) {
|
if (ast_test_flag(spy, CHANSPY_WRITE_VOLADJUST)) {
|
||||||
for (result = spy->write_queue.head; result; result = result->next)
|
for (result = spy->write_queue.head; result; result = result->next)
|
||||||
@@ -3953,10 +3951,10 @@ struct ast_frame *ast_channel_spy_read_frame(struct ast_channel_spy *spy, unsign
|
|||||||
result = spy->write_queue.head;
|
result = spy->write_queue.head;
|
||||||
spy->write_queue.head = NULL;
|
spy->write_queue.head = NULL;
|
||||||
spy->write_queue.samples = 0;
|
spy->write_queue.samples = 0;
|
||||||
|
}
|
||||||
ast_clear_flag(spy, CHANSPY_TRIGGER_FLUSH);
|
ast_clear_flag(spy, CHANSPY_TRIGGER_FLUSH);
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
if ((spy->read_queue.samples < samples) || (spy->write_queue.samples < samples))
|
if ((spy->read_queue.samples < samples) || (spy->write_queue.samples < samples))
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|||||||
Reference in New Issue
Block a user