Reported by: mika
Add ActionID response to ping if sent with request.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@165798
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
static int action_ping(struct mansession *s, const struct message *m)
{
- astman_append(s, "Response: Success\r\n"
- "Ping: Pong\r\n"
- "\r\n");
+ const char *actionid = astman_get_header(m, "ActionID");
+
+ astman_append(s, "Response: Success\r\n");
+ if (!ast_strlen_zero(actionid)){
+ astman_append(s, "ActionID: %s\r\n", actionid);
+ }
+ astman_append(s, "Ping: Pong\r\n\r\n");
return 0;
}