summaryrefslogtreecommitdiff
path: root/main
diff options
context:
space:
mode:
authorMark Michelson <mmichelson@digium.com>2014-07-29 19:41:54 +0000
committerMark Michelson <mmichelson@digium.com>2014-07-29 19:41:54 +0000
commitcac711fc95d205d586d451c027b7e542ce9c64b3 (patch)
tree076b37721a578f26e8fe049221c2768c159bc8bb /main
parente8a1e6349895a25a6270149c3aaba806a325c30f (diff)
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) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@419789 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'main')
-rw-r--r--main/manager.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/main/manager.c b/main/manager.c
index 47a909b68..0a10d8ce7 100644
--- a/main/manager.c
+++ b/main/manager.c
@@ -5303,8 +5303,9 @@ static int action_userevent(struct mansession *s, const struct message *m)
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]);
}
}