pbx_builtin_getvar_helper() will never find the associated variable.
(Bug 7892)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@42638
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
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) {