aboutsummaryrefslogtreecommitdiffstats
path: root/channels
diff options
context:
space:
mode:
authortilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b>2006-09-10 17:35:08 +0000
committertilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b>2006-09-10 17:35:08 +0000
commitb8bd2d1db39f19e1c878f6d623e9aca48d2e34cf (patch)
treea76dafe07ef7d699ed1456c5833a1db356f81f70 /channels
parent88fda7653e096169ef7dc698607720b4c594e5b6 (diff)
If the leading underscore is not stripped before comparison,
pbx_builtin_getvar_helper() will never find the associated variable. (Bug 7892) git-svn-id: http://svn.digium.com/svn/asterisk/trunk@42638 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channels')
-rw-r--r--channels/chan_sip.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c
index 4aa88292e..2f7da5fd2 100644
--- a/channels/chan_sip.c
+++ b/channels/chan_sip.c
@@ -16314,7 +16314,8 @@ static int sip_addheader(struct ast_channel *chan, void *data)
no++;
snprintf(varbuf, sizeof(varbuf), "_SIPADDHEADER%.2d", no);
- if( (pbx_builtin_getvar_helper(chan, (const char *) varbuf) == (const char *) NULL) )
+ /* Compare without the leading underscore */
+ if( (pbx_builtin_getvar_helper(chan, (const char *) varbuf + 1) == (const char *) NULL) )
ok = TRUE;
}
if (ok) {