aboutsummaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authormmichelson <mmichelson@f38db490-d61c-443f-a65b-d21fe96a405b>2007-11-16 15:44:27 +0000
committermmichelson <mmichelson@f38db490-d61c-443f-a65b-d21fe96a405b>2007-11-16 15:44:27 +0000
commitd539f49a045042b75c621aec255d2f101a253771 (patch)
treeb4a2898900213e4759987052e5ded2aaeb6b885c /apps
parentb483469ff739d3dd3de9094e1d4e6f42be978a38 (diff)
Merged revisions 89323 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r89323 | mmichelson | 2007-11-16 09:28:22 -0600 (Fri, 16 Nov 2007) | 5 lines Make realtime queues accessible from the QUEUE_MEMBER_COUNT function. (closes issue #11271, reported and patched by atis, with small modifications from me) ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89324 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'apps')
-rw-r--r--apps/app_queue.c13
1 files changed, 4 insertions, 9 deletions
diff --git a/apps/app_queue.c b/apps/app_queue.c
index 42328541b..e55926819 100644
--- a/apps/app_queue.c
+++ b/apps/app_queue.c
@@ -4153,11 +4153,9 @@ static int queue_function_var(struct ast_channel *chan, const char *cmd, char *d
static int queue_function_qac(struct ast_channel *chan, const char *cmd, char *data, char *buf, size_t len)
{
int count = 0;
- struct call_queue *q, tmpq = {
- .name = data,
- };
struct member *m;
struct ao2_iterator mem_iter;
+ struct call_queue *q;
char *option;
if (ast_strlen_zero(data)) {
@@ -4169,8 +4167,7 @@ static int queue_function_qac(struct ast_channel *chan, const char *cmd, char *d
*option++ = '\0';
else
option = "logged";
-
- if ((q = ao2_find(queues, &tmpq, OBJ_POINTER))) {
+ if ((q = load_realtime_queue(data))) {
ao2_lock(q);
if(!strcasecmp(option, "logged")) {
mem_iter = ao2_iterator_init(q->members, 0);
@@ -4205,10 +4202,8 @@ static int queue_function_qac(struct ast_channel *chan, const char *cmd, char *d
static int queue_function_qac_dep(struct ast_channel *chan, const char *cmd, char *data, char *buf, size_t len)
{
int count = 0;
- struct call_queue *q, tmpq = {
- .name = data,
- };
struct member *m;
+ struct call_queue *q;
struct ao2_iterator mem_iter;
static int depflag = 1;
@@ -4222,7 +4217,7 @@ static int queue_function_qac_dep(struct ast_channel *chan, const char *cmd, cha
return -1;
}
- if ((q = ao2_find(queues, &tmpq, OBJ_POINTER))) {
+ if((q = load_realtime_queue(data))) {
ao2_lock(q);
mem_iter = ao2_iterator_init(q->members, 0);
while ((m = ao2_iterator_next(&mem_iter))) {