diff options
author | matteo <matteo@f38db490-d61c-443f-a65b-d21fe96a405b> | 2003-03-07 06:00:13 +0000 |
---|---|---|
committer | matteo <matteo@f38db490-d61c-443f-a65b-d21fe96a405b> | 2003-03-07 06:00:13 +0000 |
commit | 6cef720265d690adb0270c833a0b05a515bad810 (patch) | |
tree | 9cf97910c36b158e27853b640770c246ff9e8066 /apps/app_disa.c | |
parent | 005002c26620c61597ef18c19707c150b72ffccb (diff) |
Fri Mar 7 07:00:00 CET 2003
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@634 f38db490-d61c-443f-a65b-d21fe96a405b
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 */ |