[asterisk-commits] mmichelson: trunk r419789 - /trunk/main/manager.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Tue Jul 29 14:41:59 CDT 2014


Author: mmichelson
Date: Tue Jul 29 14:41:54 2014
New Revision: 419789

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=419789
Log:
Do not omit the first header of a UserEvent AMI action from the corresponding emitted UserEvent.

ASTERISK-24124 #close
Reported by Matt Jordan

AFS-131 #close
Reported by Matt Jordan

Patches:
	userevent.patch uploaded by Matt Jordan (License #6283)


Modified:
    trunk/main/manager.c

Modified: trunk/main/manager.c
URL: http://svnview.digium.com/svn/asterisk/trunk/main/manager.c?view=diff&rev=419789&r1=419788&r2=419789
==============================================================================
--- trunk/main/manager.c (original)
+++ trunk/main/manager.c Tue Jul 29 14:41:54 2014
@@ -5303,8 +5303,9 @@
 
 	ast_str_reset(body);
 
-	for (x = 1; x < m->hdrcount; x++) {
-		if (strncasecmp("UserEvent:", m->headers[x], strlen("UserEvent:"))) {
+	for (x = 0; x < m->hdrcount; x++) {
+		if (strncasecmp("UserEvent:", m->headers[x], strlen("UserEvent:")) &&
+				strncasecmp("Action:", m->headers[x], strlen("Action:"))) {
 			ast_str_append(&body, 0, "%s\r\n", m->headers[x]);
 		}
 	}




More information about the asterisk-commits mailing list