Version 0.3.0 from FTP

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@546 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Mark Spencer
2002-11-11 16:37:01 +00:00
parent c6df9fae0e
commit 4fc8108a2b
4 changed files with 41 additions and 29 deletions

View File

@@ -51,13 +51,15 @@ static int playback_exec(struct ast_channel *chan, void *data)
char *options;
int option_skip=0;
int option_noanswer = 0;
char *stringp;
if (!data || !strlen((char *)data)) {
ast_log(LOG_WARNING, "Playback requires an argument (filename)\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, "skip"))
option_skip = 1;
if (options && !strcasecmp(options, "noanswer"))