diff options
author | James Golovich <james@gnuinter.net> | 2004-05-27 00:07:18 +0000 |
---|---|---|
committer | James Golovich <james@gnuinter.net> | 2004-05-27 00:07:18 +0000 |
commit | fc7593e59467a72367654c7bc637d7d679a35af2 (patch) | |
tree | 8bd200ea1184bec5cfe8e972df56d1471ec44ec8 /apps/app_controlplayback.c | |
parent | 54780434a698d0b0f960028beaf12a47fdbb0c56 (diff) |
More formatting fixes
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3088 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'apps/app_controlplayback.c')
-rwxr-xr-x | apps/app_controlplayback.c | 23 |
1 files changed, 10 insertions, 13 deletions
diff --git a/apps/app_controlplayback.c b/apps/app_controlplayback.c index 8aa7c48fe..089a7f4d8 100755 --- a/apps/app_controlplayback.c +++ b/apps/app_controlplayback.c @@ -57,33 +57,31 @@ static int controlplayback_exec(struct ast_channel *chan, void *data) char tmp[256]; char *skip = NULL, *fwd = NULL, *rev = NULL, *stop = NULL, *pause = NULL, *file = NULL; - if (!data || ast_strlen_zero((char *)data)) { ast_log(LOG_WARNING, "ControlPlayback requires an argument (filename)\n"); return -1; } - strncpy(tmp, (char *)data, sizeof(tmp)-1); file = tmp; - if((skip=strchr(tmp,'|'))) { + if ((skip=strchr(tmp,'|'))) { *skip = '\0'; *skip++; fwd=strchr(skip,'|'); - if(fwd) { + if (fwd) { *fwd = '\0'; *fwd++; rev = strchr(fwd,'|'); - if(rev) { + if (rev) { *rev = '\0'; *rev++; stop = strchr(rev,'|'); - if(stop) { + if (stop) { *stop = '\0'; *stop++; pause = strchr(stop,'|'); - if(pause) { + if (pause) { *pause = '\0'; *pause++; } @@ -93,19 +91,18 @@ static int controlplayback_exec(struct ast_channel *chan, void *data) } skipms = skip ? atoi(skip) : 3000; - if(!skipms) + if (!skipms) skipms = 3000; - if(!fwd || ! is_on_phonepad(*fwd)) + if (!fwd || !is_on_phonepad(*fwd)) fwd = "#"; - if(!rev || ! is_on_phonepad(*rev)) + if (!rev || !is_on_phonepad(*rev)) rev = "*"; - if(stop && ! is_on_phonepad(*stop)) + if (stop && !is_on_phonepad(*stop)) stop = NULL; - if(pause && ! is_on_phonepad(*pause)) + if (pause && !is_on_phonepad(*pause)) pause = NULL; - LOCAL_USER_ADD(u); res = ast_control_streamfile(chan, file, fwd, rev, stop, pause, skipms); |