[asterisk-commits] jpeeler: trunk r165798 - /trunk/main/manager.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Thu Dec 18 15:43:18 CST 2008


Author: jpeeler
Date: Thu Dec 18 15:43:17 2008
New Revision: 165798

URL: http://svn.digium.com/view/asterisk?view=rev&rev=165798
Log:
(closes issue #13993)
Reported by: mika

Add ActionID response to ping if sent with request.


Modified:
    trunk/main/manager.c

Modified: trunk/main/manager.c
URL: http://svn.digium.com/view/asterisk/trunk/main/manager.c?view=diff&rev=165798&r1=165797&r2=165798
==============================================================================
--- trunk/main/manager.c (original)
+++ trunk/main/manager.c Thu Dec 18 15:43:17 2008
@@ -1109,9 +1109,13 @@
 
 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;
 }
 




More information about the asterisk-commits mailing list