mirror of
https://github.com/asterisk/asterisk.git
synced 2025-11-18 07:48:14 +00:00
Correct action_ping() and action_events() with regards to Manager 1.1
documentation. Also, fix a bug in xml_translate(). (closes issue #11649) Reported by: ys Patches: trunk_manager.c.diff uploaded by ys (license 281) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@114527 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -1064,7 +1064,8 @@ static char mandescr_ping[] =
|
|||||||
|
|
||||||
static int action_ping(struct mansession *s, const struct message *m)
|
static int action_ping(struct mansession *s, const struct message *m)
|
||||||
{
|
{
|
||||||
astman_send_response(s, m, "Success", "Ping: Pong\r\n");
|
astman_append(s, "Response: Success\r\n"
|
||||||
|
"Ping: Pong\r\n");
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1576,10 +1577,11 @@ static int action_events(struct mansession *s, const struct message *m)
|
|||||||
|
|
||||||
res = set_eventmask(s, mask);
|
res = set_eventmask(s, mask);
|
||||||
if (res > 0)
|
if (res > 0)
|
||||||
astman_send_response(s, m, "Success", "Events: On\r\n");
|
astman_append(s, "Response: Success\r\n"
|
||||||
|
"Events: On\r\n");
|
||||||
else if (res == 0)
|
else if (res == 0)
|
||||||
astman_send_response(s, m, "Success", "Events: Off\r\n");
|
astman_append(s, "Response: Success\r\n"
|
||||||
|
"Events: Off\r\n");
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -3431,11 +3433,13 @@ static void xml_translate(struct ast_str **out, char *in, struct ast_variable *v
|
|||||||
ast_str_append(out, 0, xml ? "'" : "</td></tr>\n");
|
ast_str_append(out, 0, xml ? "'" : "</td></tr>\n");
|
||||||
in_data = 0;
|
in_data = 0;
|
||||||
}
|
}
|
||||||
ast_str_append(out, 0, xml ? " /></response>\n" :
|
if (inobj) {
|
||||||
"<tr><td colspan=\"2\"><hr></td></tr>\r\n");
|
ast_str_append(out, 0, xml ? " /></response>\n" :
|
||||||
inobj = 0;
|
"<tr><td colspan=\"2\"><hr></td></tr>\r\n");
|
||||||
ao2_ref(vco, -1);
|
inobj = 0;
|
||||||
vco = NULL;
|
ao2_ref(vco, -1);
|
||||||
|
vco = NULL;
|
||||||
|
}
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user