aboutsummaryrefslogtreecommitdiffstats
path: root/pbx.c
diff options
context:
space:
mode:
authormatteo <matteo@f38db490-d61c-443f-a65b-d21fe96a405b>2003-03-18 19:55:35 +0000
committermatteo <matteo@f38db490-d61c-443f-a65b-d21fe96a405b>2003-03-18 19:55:35 +0000
commite4ec6bb8c79fc6fb1015154e5c40bc2cb025fe23 (patch)
tree60a236c380cb4657d545ebd833c4a527dc14db20 /pbx.c
parent79e22f094ba517169d857b4ade661153ac1a3e29 (diff)
mar mar 18 20:55:27 CET 2003
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@655 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'pbx.c')
-rwxr-xr-xpbx.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/pbx.c b/pbx.c
index 1115580aa..bfd4402f3 100755
--- a/pbx.c
+++ b/pbx.c
@@ -689,16 +689,14 @@ static void pbx_substitute_variables_temp(struct ast_channel *c,char *cp3,char *
/* Now we have the variable name on cp3 */
if ((first=strchr(cp3,':'))) {
*first='\0';
+ pbx_substitute_variables_temp(c,cp3,cp4);
+ if (!(*cp4)) return;
offset=atoi(first+1);
if ((second=strchr(first+1,':'))) {
*second='\0';
offset2=atoi(second+1);
- } else {
- offset2=offset;
- offset=0;
- }
- pbx_substitute_variables_temp(c,cp3,cp4);
- if (!(*cp4)) return;
+ } else
+ offset2=strlen(*cp4)-offset;
if (abs(offset)>strlen(*cp4)) {
if (offset>=0) offset=strlen(*cp4);
else offset=-strlen(*cp4);