[asterisk-commits] russell: branch 1.8 r284065 - /branches/1.8/main/manager.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Sat Aug 28 16:29:53 CDT 2010
Author: russell
Date: Sat Aug 28 16:29:45 2010
New Revision: 284065
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=284065
Log:
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
Modified:
branches/1.8/main/manager.c
Modified: branches/1.8/main/manager.c
URL: http://svnview.digium.com/svn/asterisk/branches/1.8/main/manager.c?view=diff&rev=284065&r1=284064&r2=284065
==============================================================================
--- branches/1.8/main/manager.c (original)
+++ branches/1.8/main/manager.c Sat Aug 28 16:29:45 2010
@@ -1697,8 +1697,9 @@
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 */
More information about the asterisk-commits
mailing list