diff options
author | Matteo Brancaleoni <mbrancaleoni@espia.it> | 2003-03-07 06:00:13 +0000 |
---|---|---|
committer | Matteo Brancaleoni <mbrancaleoni@espia.it> | 2003-03-07 06:00:13 +0000 |
commit | f2c4538f612a8976c7cc8893000165fa06733ddb (patch) | |
tree | 9cf97910c36b158e27853b640770c246ff9e8066 /apps/app_disa.c | |
parent | a8723ad68f80bafb65ee6a66d2b4b1f6a7ee01c8 (diff) |
Fri Mar 7 07:00:00 CET 2003
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@634 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'apps/app_disa.c')
-rwxr-xr-x | apps/app_disa.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/apps/app_disa.c b/apps/app_disa.c index 89d956deb..978336936 100755 --- a/apps/app_disa.c +++ b/apps/app_disa.c @@ -251,7 +251,7 @@ static int disa_exec(struct ast_channel *chan, void *data) tmp[0] = 0; while(fgets(tmp,sizeof(tmp) - 1,fp)) { - char *stringp=NULL; + char *stringp=NULL,*stringp2; if (!tmp[0]) continue; if (tmp[strlen(tmp) - 1] == '\n') tmp[strlen(tmp) - 1] = 0; @@ -261,9 +261,12 @@ static int disa_exec(struct ast_channel *chan, void *data) if (tmp[0] == ';') continue; stringp=tmp; strsep(&stringp, "|"); - /* save 2nd arg as clid */ - ourcallerid = arg2; - ourcontext = strsep(&stringp, "|"); + stringp2=strsep(&stringp, "|"); + if (stringp2) { + ourcontext=stringp2; + stringp2=strsep(&stringp, "|"); + if (stringp2) ourcallerid=stringp2; + } /* password must be in valid format (numeric) */ if (sscanf(tmp,"%d",&j) < 1) continue; /* if we got it */ |