From a5f982fd1c9019db11853d18736fc343245fb3f2 Mon Sep 17 00:00:00 2001 From: Travis Cross Date: Mon, 26 May 2014 18:43:23 +0000 Subject: [PATCH] mod_fifo: Replace duplicate code with node_caller_count() --- src/mod/applications/mod_fifo/mod_fifo.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/mod/applications/mod_fifo/mod_fifo.c b/src/mod/applications/mod_fifo/mod_fifo.c index 935431c20d..c1a8b27f74 100644 --- a/src/mod/applications/mod_fifo/mod_fifo.c +++ b/src/mod/applications/mod_fifo/mod_fifo.c @@ -674,15 +674,13 @@ static switch_status_t caller_read_frame_callback(switch_core_session_t *session static switch_status_t consumer_read_frame_callback(switch_core_session_t *session, switch_frame_t *frame, void *user_data) { fifo_node_t *node, **node_list = (fifo_node_t **) user_data; - int x = 0, total = 0, i = 0; + int total = 0, i = 0; for (i = 0;; i++) { if (!(node = node_list[i])) { break; } - for (x = 0; x < MAX_PRI; x++) { - total += fifo_queue_size(node->fifo_list[x]); - } + total += node_caller_count(node); } if (total) {