diff options
author | markster <markster@f38db490-d61c-443f-a65b-d21fe96a405b> | 2003-06-23 23:40:56 +0000 |
---|---|---|
committer | markster <markster@f38db490-d61c-443f-a65b-d21fe96a405b> | 2003-06-23 23:40:56 +0000 |
commit | c08ce38ef7298f616b8995ebc66bf44c1993def9 (patch) | |
tree | 677c8d3abe5d215b48c00a8b7bdc450a0b2bf6cf /apps/app_queue.c | |
parent | 13bea9924b9582a1d81635818922d212455070c4 (diff) |
Nest event inside if statement
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@1113 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'apps/app_queue.c')
-rwxr-xr-x | apps/app_queue.c | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/apps/app_queue.c b/apps/app_queue.c index 9d451d101..d78a81e99 100755 --- a/apps/app_queue.c +++ b/apps/app_queue.c @@ -158,7 +158,9 @@ static int join_queue(char *queuename, struct queue_ent *qe) manager_event(EVENT_FLAG_CALL, "Join", "Channel: %s\r\nQueue: %s\r\nPosition: %d\r\n", qe->chan->name, q->name, qe->pos ); - +#if 0 +ast_log(LOG_NOTICE, "Queue '%s' Join, Channel '%s', Position '%d'\n", q->name, qe->chan->name, qe->pos ); +#endif } ast_pthread_mutex_unlock(&q->lock); break; @@ -211,15 +213,20 @@ static void leave_queue(struct queue_ent *qe) if (!q) return; ast_pthread_mutex_lock(&q->lock); - /* Take us out of the queue */ - manager_event(EVENT_FLAG_CALL, "Leave", - "Channel: %s\r\nQueue: %s\r\n", - qe->chan->name, q->name ); + prev = NULL; cur = q->head; while(cur) { if (cur == qe) { q->count--; + + /* Take us out of the queue */ + manager_event(EVENT_FLAG_CALL, "Leave", + "Channel: %s\r\nQueue: %s\r\n", + qe->chan->name, q->name ); +#if 0 +ast_log(LOG_NOTICE, "Queue '%s' Leave, Channel '%s'\n", q->name, qe->chan->name ); +#endif /* Take us out of the queue */ if (prev) prev->next = cur->next; |