diff options
author | Matteo Brancaleoni <mbrancaleoni@espia.it> | 2003-03-04 06:00:19 +0000 |
---|---|---|
committer | Matteo Brancaleoni <mbrancaleoni@espia.it> | 2003-03-04 06:00:19 +0000 |
commit | ce58e5862d32dcb5964716f8244ded00898f3d42 (patch) | |
tree | a3cf1e0cb0fa8eefa5779698cef6b7f9329bd52e /pbx.c | |
parent | 3f860700280a0e733d12252f97fe6e14e4094a53 (diff) |
Tue Mar 4 07:00:01 CET 2003
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@631 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'pbx.c')
-rwxr-xr-x | pbx.c | 20 |
1 files changed, 9 insertions, 11 deletions
@@ -766,7 +766,6 @@ static void pbx_substitute_variables_helper(struct ast_channel *c,char *cp1,char *cp2='\0'; do { char *start,*start2; - if (!(*wherearewe)) break; if ((tmp=strstr(wherearewe,"${"))) { variables++; length=(int)(tmp-wherearewe); @@ -818,16 +817,15 @@ static void pbx_substitute_variables_helper(struct ast_channel *c,char *cp1,char cp1=cp2; } - - pbx_substitute_variables_temp(c,cp1,&cp4); - - if (cp4) { - /* reset output variable so we could store the result */ - *cp2='\0'; - length=strlen(cp4); - strncat(cp2,cp4,length); - } else { - if (count) cp2[0]='\0'; + if (count) { + pbx_substitute_variables_temp(c,cp1,&cp4); + if (cp4) { + /* reset output variable so we could store the result */ + *cp2='\0'; + length=strlen(cp4); + strncat(cp2,cp4,length); + } else + cp2[0]='\0'; } break; } |