[asterisk-commits] russell: trunk r53036 - in /trunk: ./
apps/app_queue.c
asterisk-commits at lists.digium.com
asterisk-commits at lists.digium.com
Wed Jan 31 10:35:15 MST 2007
Author: russell
Date: Wed Jan 31 11:35:14 2007
New Revision: 53036
URL: http://svn.digium.com/view/asterisk?view=rev&rev=53036
Log:
Merged revisions 53035 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r53035 | russell | 2007-01-31 11:34:22 -0600 (Wed, 31 Jan 2007) | 4 lines
Instead of always creating a realtime queue member as unpaused, read the
"paused" column and use that value for the paused status of the member.
(issue #8949, jmls)
........
Modified:
trunk/ (props changed)
trunk/apps/app_queue.c
Propchange: trunk/
------------------------------------------------------------------------------
Binary property 'branch-1.4-merged' - no diff available.
Modified: trunk/apps/app_queue.c
URL: http://svn.digium.com/view/asterisk/trunk/apps/app_queue.c?view=diff&rev=53036&r1=53035&r2=53036
==============================================================================
--- trunk/apps/app_queue.c (original)
+++ trunk/apps/app_queue.c Wed Jan 31 11:35:14 2007
@@ -956,10 +956,11 @@
}
}
-static void rt_handle_member_record(struct call_queue *q, char *interface, const char *membername, const char *penalty_str)
+static void rt_handle_member_record(struct call_queue *q, char *interface, const char *membername, const char *penalty_str, const char *paused_str)
{
struct member *m, *prev_m;
int penalty = 0;
+ int paused = 0;
if (penalty_str) {
penalty = atoi(penalty_str);
@@ -967,6 +968,12 @@
penalty = 0;
}
+ if (paused_str) {
+ paused = atoi(paused_str);
+ if (paused < 0)
+ paused = 0;
+ }
+
/* Find the member, or the place to put a new one. */
for (m = q->members, prev_m = NULL;
m && strcmp(m->interface, interface);
@@ -974,7 +981,7 @@
/* Create a new one if not found, else update penalty */
if (!m) {
- if ((m = create_queue_member(interface, membername, penalty, 0))) {
+ if ((m = create_queue_member(interface, membername, penalty, paused))) {
m->dead = 0;
add_to_interfaces(interface);
if (prev_m) {
@@ -985,6 +992,7 @@
}
} else {
m->dead = 0; /* Do not delete this one. */
+ m->paused = paused;
m->penalty = penalty;
}
}
@@ -1106,7 +1114,8 @@
while ((interface = ast_category_browse(member_config, interface))) {
rt_handle_member_record(q, interface,
S_OR(ast_variable_retrieve(member_config, interface, "membername"), interface),
- ast_variable_retrieve(member_config, interface, "penalty"));
+ ast_variable_retrieve(member_config, interface, "penalty"),
+ ast_variable_retrieve(member_config, interface, "paused"));
}
/* Delete all realtime members that have been deleted in DB. */
More information about the asterisk-commits
mailing list