]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Response to QueueRule manager command does not contain ActionID if it was specified.
authorRichard Mudgett <rmudgett@digium.com>
Wed, 29 Jun 2011 18:05:15 +0000 (18:05 +0000)
committerRichard Mudgett <rmudgett@digium.com>
Wed, 29 Jun 2011 18:05:15 +0000 (18:05 +0000)
* Add ActionID support as documented for the QueueRule AMI action.

* Remove documentation for ActionID with the Queues AMI action.  The
output does not follow normal AMI response output and there is no place to
put an ActionID header.

(closes issue AST-602)
Reported by: Vlad Povorozniuc
Patches:
      jira_ast_602_v1.8.patch (license #5621) patch uploaded by rmudgett
Tested by: Vlad Povorozniuc, rmudgett

Review: https://reviewboard.asterisk.org/r/1295/

JIRA SWP-3575

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

apps/app_queue.c

index dfc1a0b2501f9437d1be680c2b20fdb6e8dbce2e..ac5d83d8ef449743f3d7b2653e5d945819a0ef49 100644 (file)
@@ -680,7 +680,6 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
                        Queues.
                </synopsis>
                <syntax>
-                       <xi:include xpointer="xpointer(/docs/manager[@name='Login']/syntax/parameter[@name='ActionID'])" />
                </syntax>
                <description>
                </description>
@@ -7091,9 +7090,15 @@ static int manager_queues_show(struct mansession *s, const struct message *m)
 static int manager_queue_rule_show(struct mansession *s, const struct message *m)
 {
        const char *rule = astman_get_header(m, "Rule");
+       const char *id = astman_get_header(m, "ActionID");
        struct rule_list *rl_iter;
        struct penalty_rule *pr_iter;
 
+       astman_append(s, "Response: Success\r\n");
+       if (!ast_strlen_zero(id)) {
+               astman_append(s, "ActionID: %s\r\n", id);
+       }
+
        AST_LIST_LOCK(&rule_lists);
        AST_LIST_TRAVERSE(&rule_lists, rl_iter, list) {
                if (ast_strlen_zero(rule) || !strcasecmp(rule, rl_iter->name)) {
@@ -7107,6 +7112,10 @@ static int manager_queue_rule_show(struct mansession *s, const struct message *m
        }
        AST_LIST_UNLOCK(&rule_lists);
 
+       /*
+        * Two blank lines instead of one because the Response and
+        * ActionID headers used to not be present.
+        */
        astman_append(s, "\r\n\r\n");
 
        return RESULT_SUCCESS;