]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Add the interface of a queue member to the output of the "queue show" command
authorMark Michelson <mmichelson@digium.com>
Thu, 26 Jun 2008 22:52:39 +0000 (22:52 +0000)
committerMark Michelson <mmichelson@digium.com>
Thu, 26 Jun 2008 22:52:39 +0000 (22:52 +0000)
so that it can easily be associated with a queue member's name. This helps
so that the appropriate queue member can be removed or paused since the
interface is required, not the member's name.

(closes issue #12783)
Reported by: davevg
Patches:
      app_queue.diff uploaded by davevg (license 209) with small mod from me

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@125585 65c4cc65-6c06-0410-ace0-fbb531ad65f3

apps/app_queue.c

index 803287627cdf39ac8039ecb5e963055e8a56c67b..587e2585b9e4f1bc823e90499bcd70ac24ba6924 100644 (file)
@@ -4389,7 +4389,7 @@ static int __queues_show(struct mansession *s, int manager, int fd, int argc, ch
        struct member *mem;
        int pos, queue_show;
        time_t now;
-       char max_buf[80];
+       char max_buf[150];
        char *max;
        size_t max_left;
        float sl = 0;
@@ -4473,6 +4473,9 @@ static int __queues_show(struct mansession *s, int manager, int fd, int argc, ch
                                max_buf[0] = '\0';
                                max = max_buf;
                                max_left = sizeof(max_buf);
+                               if (strcasecmp(mem->membername, mem->interface)) {
+                                       ast_build_string(&max, &max_left, " (%s)", mem->interface);
+                               }
                                if (mem->penalty)
                                        ast_build_string(&max, &max_left, " with penalty %d", mem->penalty);
                                if (mem->dynamic)