[Asterisk-code-review] res agi: Remove unnecessary queuing of deferred frames. (asterisk[14])

Mark Michelson asteriskteam at digium.com
Thu Nov 3 09:29:59 CDT 2016


Mark Michelson has uploaded a new change for review. ( https://gerrit.asterisk.org/4287 )

Change subject: res_agi: Remove unnecessary queuing of deferred frames.
......................................................................

res_agi: Remove unnecessary queuing of deferred frames.

res_agi recently received a change where, rather than dropping frames,
it would defer them until the end of the AGI's execution. Then it would
queue the frames onto the channel so that they could be processed.

There were two places where frames could be queued onto the channel. The
first is, as stated before, when the script's execution was complete.
Deferred frames were also queued onto the channel whenever an AGI
command was read from the process. Since the AGI was not complete, this
just meant that the next times through the loop, we would read those
frames off the channel and put them back onto the deferred frame queue
again.

This patch removes queuing of deferred frames from the case where an AGI
command is received. Instead, deferred frames are only queued at the end
of script execution.

ASTERISK-26343

Change-Id: Ieb74bcb358873b40c14edb523923b03482bb4578
---
M res/res_agi.c
1 file changed, 0 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/87/4287/1

diff --git a/res/res_agi.c b/res/res_agi.c
index e0eb8e2..06d6264 100644
--- a/res/res_agi.c
+++ b/res/res_agi.c
@@ -4253,8 +4253,6 @@
 				buf[buflen - 1] = '\0';
 			}
 
-			queue_deferred_frames(&deferred_frames, chan);
-
 			if (agidebug)
 				ast_verbose("<%s>AGI Rx << %s\n", ast_channel_name(chan), buf);
 			cmd_status = agi_handle_command(chan, agi, buf, dead);

-- 
To view, visit https://gerrit.asterisk.org/4287
To unsubscribe, visit https://gerrit.asterisk.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ieb74bcb358873b40c14edb523923b03482bb4578
Gerrit-PatchSet: 1
Gerrit-Project: asterisk
Gerrit-Branch: 14
Gerrit-Owner: Mark Michelson <mmichelson at digium.com>



More information about the asterisk-code-review mailing list