diff options
author | mmichelson <mmichelson@f38db490-d61c-443f-a65b-d21fe96a405b> | 2008-06-03 21:22:52 +0000 |
---|---|---|
committer | mmichelson <mmichelson@f38db490-d61c-443f-a65b-d21fe96a405b> | 2008-06-03 21:22:52 +0000 |
commit | 33d1d68d0dacaf9c390f26ca6fcaf2e889276942 (patch) | |
tree | 2932d599ba55ce80baea9fff0be5bd530edec7b4 /apps/app_queue.c | |
parent | d8c22bd877205f0f2397fa592f00fdf70eda942e (diff) |
Adding two new queue log events. The ADDMEMBER event is logged when
a dynamic realtime queue member is added to the queue, and the
REMOVEMEMBER event is logged when a dynamic realtime member is
removed. Since no calling channel is associated with these events
the string "REALTIME" is placed where the channel's unique id is
normally placed.
(closes issue #12774)
Reported by: atis
Patches:
queue_log_rt_members.patch uploaded by atis (license 242)
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@120166 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'apps/app_queue.c')
-rw-r--r-- | apps/app_queue.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/apps/app_queue.c b/apps/app_queue.c index c50549120..fe9be2c14 100644 --- a/apps/app_queue.c +++ b/apps/app_queue.c @@ -1358,6 +1358,7 @@ static void rt_handle_member_record(struct call_queue *q, char *interface, const m->realtime = 1; ast_copy_string(m->rt_uniqueid, rt_uniqueid, sizeof(m->rt_uniqueid)); add_to_interfaces(m->state_interface); + ast_queue_log(q->name, "REALTIME", m->interface, "ADDMEMBER", "%s", ""); ao2_link(q->members, m); ao2_ref(m, -1); m = NULL; @@ -1542,6 +1543,7 @@ static struct call_queue *find_queue_by_name_rt(const char *queuename, struct as mem_iter = ao2_iterator_init(q->members, 0); while ((m = ao2_iterator_next(&mem_iter))) { if (m->dead) { + ast_queue_log(q->name, "REALTIME", m->interface, "REMOVEMEMBER", "%s", ""); ao2_unlink(q->members, m); remove_from_interfaces(m->state_interface); q->membercount--; @@ -1649,6 +1651,7 @@ static void update_realtime_members(struct call_queue *q) mem_iter = ao2_iterator_init(q->members, 0); while ((m = ao2_iterator_next(&mem_iter))) { if (m->dead) { + ast_queue_log(q->name, "REALTIME", m->interface, "REMOVEMEMBER", "%s", ""); ao2_unlink(q->members, m); remove_from_interfaces(m->state_interface); q->membercount--; |