[svn-commits] mmichelson: branch 1.6.2 r190253 - in /branches/1.6.2: ./ apps/app_queue.c
SVN commits to the Digium repositories
svn-commits at lists.digium.com
Thu Apr 23 12:47:21 CDT 2009
Author: mmichelson
Date: Thu Apr 23 12:47:17 2009
New Revision: 190253
URL: http://svn.digium.com/svn-view/asterisk?view=rev&rev=190253
Log:
Merged revisions 190250 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk
........
r190250 | mmichelson | 2009-04-23 12:45:35 -0500 (Thu, 23 Apr 2009) | 9 lines
Fix reversed behavior of leavewhenempty option in queues.conf.
(closes issue #14650)
Reported by: alecdavis
Patches:
14650.patch uploaded by mmichelson (license 60)
Tested by: mmichelson, lmadsen
........
Modified:
branches/1.6.2/ (props changed)
branches/1.6.2/apps/app_queue.c
Propchange: branches/1.6.2/
------------------------------------------------------------------------------
Binary property 'trunk-merged' - no diff available.
Modified: branches/1.6.2/apps/app_queue.c
URL: http://svn.digium.com/svn-view/asterisk/branches/1.6.2/apps/app_queue.c?view=diff&rev=190253&r1=190252&r2=190253
==============================================================================
--- branches/1.6.2/apps/app_queue.c (original)
+++ branches/1.6.2/apps/app_queue.c Thu Apr 23 12:47:17 2009
@@ -1303,7 +1303,7 @@
return 0;
}
-static void parse_empty_options(const char *value, enum empty_conditions *empty)
+static void parse_empty_options(const char *value, enum empty_conditions *empty, int joinempty)
{
char *value_copy = ast_strdupa(value);
char *option = NULL;
@@ -1328,10 +1328,12 @@
*empty = (QUEUE_EMPTY_PENALTY | QUEUE_EMPTY_INVALID);
} else if (!strcasecmp(option, "strict")) {
*empty = (QUEUE_EMPTY_PENALTY | QUEUE_EMPTY_INVALID | QUEUE_EMPTY_PAUSED | QUEUE_EMPTY_UNAVAILABLE);
- } else if (ast_false(option)) {
+ } else if ((ast_false(option) && joinempty) || (ast_true(option) && !joinempty)) {
*empty = (QUEUE_EMPTY_PENALTY | QUEUE_EMPTY_INVALID | QUEUE_EMPTY_PAUSED);
- } else if (ast_true(option)) {
+ } else if ((ast_false(option) && !joinempty) || (ast_true(option) && joinempty)) {
*empty = 0;
+ } else {
+ ast_log(LOG_WARNING, "Unknown option %s for '%s'\n", option, joinempty ? "joinempty" : "leavewhenempty");
}
}
}
@@ -1496,9 +1498,9 @@
}
q->strategy = strategy;
} else if (!strcasecmp(param, "joinempty")) {
- parse_empty_options(val, &q->joinempty);
+ parse_empty_options(val, &q->joinempty, 1);
} else if (!strcasecmp(param, "leavewhenempty")) {
- parse_empty_options(val, &q->leavewhenempty);
+ parse_empty_options(val, &q->leavewhenempty, 0);
} else if (!strcasecmp(param, "eventmemberstatus")) {
q->maskmemberstatus = !ast_true(val);
} else if (!strcasecmp(param, "eventwhencalled")) {
More information about the svn-commits
mailing list