]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
mar mar 18 20:55:27 CET 2003
authorMatteo Brancaleoni <mbrancaleoni@espia.it>
Tue, 18 Mar 2003 19:55:35 +0000 (19:55 +0000)
committerMatteo Brancaleoni <mbrancaleoni@espia.it>
Tue, 18 Mar 2003 19:55:35 +0000 (19:55 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@655 65c4cc65-6c06-0410-ace0-fbb531ad65f3

pbx.c

diff --git a/pbx.c b/pbx.c
index 1115580aa018e1fc4dcfc5ce36bb8b9e5c9f4bae..bfd4402f31e46de3c301bb005304efbb54986d40 100755 (executable)
--- 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);