diff options
author | Russell Bryant <russell@russellbryant.com> | 2010-08-28 21:30:25 +0000 |
---|---|---|
committer | Russell Bryant <russell@russellbryant.com> | 2010-08-28 21:30:25 +0000 |
commit | dce0822d603b0151a6d6c4fe6c83c41f3155da9d (patch) | |
tree | 91d8e133601be992f413fb9508a190d894322835 /main/manager.c | |
parent | 22c5c7c437216ca575fbf7ba791a838f3d6162ce (diff) |
Merged revisions 284065 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8
........
r284065 | russell | 2010-08-28 16:29:45 -0500 (Sat, 28 Aug 2010) | 13 lines
Be more flexible with whitespace on AMI action headers.
Previously, this code required exactly one space to be after the ':' in headers
for an AMI action. This now makes whitespace optional, and allows whitespace that
is there to vary in amount.
(closes issue #17862)
Reported by: cmoye
Patches:
manager.c.patch_trunk uploaded by cmoye (license 858)
manager.c.patch_1.8 uploaded by cmoye (license 858)
Tested by: cmoye
........
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@284066 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'main/manager.c')
-rw-r--r-- | main/manager.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/main/manager.c b/main/manager.c index 47ca494ac..7ec42a77c 100644 --- a/main/manager.c +++ b/main/manager.c @@ -1697,8 +1697,9 @@ static const char *__astman_get_header(const struct message *m, char *var, int m for (x = 0; x < m->hdrcount; x++) { const char *h = m->headers[x]; - if (!strncasecmp(var, h, l) && h[l] == ':' && h[l+1] == ' ') { - const char *value = h + l + 2; + if (!strncasecmp(var, h, l) && h[l] == ':') { + const char *value = h + l + 1; + value = ast_skip_blanks(value); /* ignore leading spaces in the value */ /* found a potential candidate */ if (mode & GET_HEADER_SKIP_EMPTY && ast_strlen_zero(value)) continue; /* not interesting */ |