]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
res_agi: Fix malformed AGI usage response
authorSean Bright <sean.bright@gmail.com>
Tue, 23 May 2017 17:35:25 +0000 (13:35 -0400)
committerSean Bright <sean.bright@gmail.com>
Tue, 23 May 2017 17:35:25 +0000 (13:35 -0400)
If the generated XML documentation for a command does not end with a \n,
the postamble of the usage message does not appear on its own line.

ASTERISK-25662 #close

Change-Id: If190f1e9e37fe215fed95897d78d4a6e142b0020

res/res_agi.c

index cd0d621eb18f9368f860ebc5f8c1bd9bf1705226..dde3450a6446af3ac13561f74eb13c678767f5ec 100644 (file)
@@ -4039,7 +4039,7 @@ static enum agi_result agi_handle_command(struct ast_channel *chan, AGI *agi, ch
                                ast_agi_send(agi->fd, chan, "520 Invalid command syntax.  Proper usage not available.\n");
                        } else {
                                ast_agi_send(agi->fd, chan, "520-Invalid command syntax.  Proper usage follows:\n");
-                               ast_agi_send(agi->fd, chan, "%s", c->usage);
+                               ast_agi_send(agi->fd, chan, "%s\n", c->usage);
                                ast_agi_send(agi->fd, chan, "520 End of proper usage.\n");
                        }