[asterisk-commits] jrose: trunk r372148 - in /trunk: CHANGES apps/app_queue.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Tue Sep 4 14:26:09 CDT 2012
Author: jrose
Date: Tue Sep 4 14:26:02 2012
New Revision: 372148
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=372148
Log:
app_queue: Only log PAUSEALL/UNPAUSEALL when 1+ memebers changed.
Prior to this patch, if pause or unpause was issued on an interface
without specifying a specific queue, a PAUSEALL or UNPAUSEALL event
would be logged in the queue log even if that interface wasn't a
member of any queues. This patch changes it so that these events are
only logged when at least one member of any queue exists for that
interface.
(closes issue AST-946)
Reported by: John Bigelow
Review: https://reviewboard.asterisk.org/r/2079/
Modified:
trunk/CHANGES
trunk/apps/app_queue.c
Modified: trunk/CHANGES
URL: http://svnview.digium.com/svn/asterisk/trunk/CHANGES?view=diff&rev=372148&r1=372147&r2=372148
==============================================================================
--- trunk/CHANGES (original)
+++ trunk/CHANGES Tue Sep 4 14:26:02 2012
@@ -7,6 +7,16 @@
=== and the other UPGRADE files for older releases.
===
==============================================================================
+------------------------------------------------------------------------------
+--- Functionality changes from Asterisk 11 to Asterisk 12 --------------------
+------------------------------------------------------------------------------
+
+Logging
+-------------------
+ * When performing queue pause/unpause on an interface without specifying an
+ individual queue, the PAUSEALL/UNPAUSEALL event will only be logged if at
+ least one member of any queue exists for that interface.
+
------------------------------------------------------------------------------
--- Functionality changes from Asterisk 10 to Asterisk 11 --------------------
------------------------------------------------------------------------------
Modified: trunk/apps/app_queue.c
URL: http://svnview.digium.com/svn/asterisk/trunk/apps/app_queue.c?view=diff&rev=372148&r1=372147&r2=372148
==============================================================================
--- trunk/apps/app_queue.c (original)
+++ trunk/apps/app_queue.c Tue Sep 4 14:26:02 2012
@@ -5944,11 +5944,6 @@
struct ao2_iterator queue_iter;
int failed;
- /* Special event for when all queues are paused - individual events still generated */
- /* XXX In all other cases, we use the membername, but since this affects all queues, we cannot */
- if (ast_strlen_zero(queuename))
- ast_queue_log("NONE", "NONE", interface, (paused ? "PAUSEALL" : "UNPAUSEALL"), "%s", "");
-
queue_iter = ao2_iterator_init(queues, 0);
while ((q = ao2_t_iterator_next(&queue_iter, "Iterate over queues"))) {
ao2_lock(q);
@@ -5971,6 +5966,16 @@
continue;
}
found++;
+
+ /* Before we do the PAUSE/UNPAUSE log, if this was a PAUSEALL/UNPAUSEALL, log that here, but only on the first found entry. */
+ if (found == 1) {
+
+ /* XXX In all other cases, we use the membername, but since this affects all queues, we cannot */
+ if (ast_strlen_zero(queuename)) {
+ ast_queue_log("NONE", "NONE", interface, (paused ? "PAUSEALL" : "UNPAUSEALL"), "%s", "");
+ }
+ }
+
mem->paused = paused;
if (queue_persistent_members) {
More information about the asterisk-commits
mailing list