diff options
Diffstat (limited to 'apps/app_url.c')
-rwxr-xr-x | apps/app_url.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/apps/app_url.c b/apps/app_url.c index 53a589481..6cae9eb9b 100755 --- a/apps/app_url.c +++ b/apps/app_url.c @@ -52,13 +52,15 @@ static int sendurl_exec(struct ast_channel *chan, void *data) char *options; int option_wait=0; struct ast_frame *f; + char *stringp=NULL; if (!data || !strlen((char *)data)) { ast_log(LOG_WARNING, "SendURL requires an argument (URL)\n"); return -1; } strncpy(tmp, (char *)data, sizeof(tmp)-1); - strtok(tmp, "|"); - options = strtok(NULL, "|"); + stringp=tmp; + strsep(&stringp, "|"); + options = strsep(&stringp, "|"); if (options && !strcasecmp(options, "wait")) option_wait = 1; LOCAL_USER_ADD(u); |