]> 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:37:20 +0000 (12:37 -0500)
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 d46a019eadf5a86300486712f5e9b24757813700..e84e05141080c278850bbb596c9e3907c27570c6 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");
                        }