[Asterisk-cvs] asterisk/apps app_queue.c,1.77,1.78
markster at lists.digium.com
markster at lists.digium.com
Fri Jul 23 23:51:50 CDT 2004
Update of /usr/cvsroot/asterisk/apps
In directory localhost.localdomain:/tmp/cvs-serv9031/apps
Modified Files:
app_queue.c
Log Message:
Create option for joining empty queue (bug #2126)
Index: app_queue.c
===================================================================
RCS file: /usr/cvsroot/asterisk/apps/app_queue.c,v
retrieving revision 1.77
retrieving revision 1.78
diff -u -d -r1.77 -r1.78
--- app_queue.c 17 Jul 2004 20:58:00 -0000 1.77
+++ app_queue.c 24 Jul 2004 03:37:50 -0000 1.78
@@ -216,6 +216,7 @@
int rrpos; /* Round Robin - position */
int wrapped; /* Round Robin - wrapped around? */
+ int joinempty; /* Do we care if the queue has no members? */
struct member *members; /* Member channels to be tried */
struct queue_ent *head; /* Start of the actual queue */
@@ -280,7 +281,7 @@
if (!strcasecmp(q->name, queuename)) {
/* This is our one */
ast_mutex_lock(&q->lock);
- if (q->members && (!q->maxlen || (q->count < q->maxlen))) {
+ if ((q->members || q->joinempty) && (!q->maxlen || (q->count < q->maxlen))) {
/* There's space for us, put us at the right position inside
* the queue.
* Take into account the priority of the calling user */
@@ -1830,6 +1831,8 @@
ast_log(LOG_WARNING, "'%s' isn't a valid strategy, using ringall instead\n", var->value);
q->strategy = 0;
}
+ } else if (!strcasecmp(var->name, "joinempty")) {
+ q->joinempty = ast_true(var->value);
} else {
ast_log(LOG_WARNING, "Unknown keyword in queue '%s': %s at line %d of queue.conf\n", cat, var->name, var->lineno);
}
More information about the svn-commits
mailing list