diff options
author | Mark Michelson <mmichelson@digium.com> | 2009-06-26 20:52:19 +0000 |
---|---|---|
committer | Mark Michelson <mmichelson@digium.com> | 2009-06-26 20:52:19 +0000 |
commit | e403a7fdfbbb87301ce2576b595ddc060c23ddd2 (patch) | |
tree | 3b580435581b102281bc0ced0487d4c56d57a166 /main | |
parent | 92f0cdfce7131988eef38fc9533db1e33fd23bc0 (diff) |
Add timestamp to response to "Ping" manager action.
(closes issue #14596)
Reported by: JimDickenson
Patches:
pong2.diff uploaded by JimDickenson (license 710)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@203783 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'main')
-rw-r--r-- | main/manager.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/main/manager.c b/main/manager.c index 76e24d170..0670da36d 100644 --- a/main/manager.c +++ b/main/manager.c @@ -1808,12 +1808,13 @@ static int authenticate(struct mansession *s, const struct message *m) static int action_ping(struct mansession *s, const struct message *m) { const char *actionid = astman_get_header(m, "ActionID"); + struct timeval now = ast_tvnow(); 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"); + astman_append(s, "Ping: Pong\r\nTimestamp:%ld.%06lu\r\n", now.tv_sec, (unsigned long) now.tv_usec); return 0; } |