diff options
author | citats <citats@f38db490-d61c-443f-a65b-d21fe96a405b> | 2004-05-27 00:07:18 +0000 |
---|---|---|
committer | citats <citats@f38db490-d61c-443f-a65b-d21fe96a405b> | 2004-05-27 00:07:18 +0000 |
commit | 117ee582dfae240ae804db058b2e5a5a933e765e (patch) | |
tree | 8bd200ea1184bec5cfe8e972df56d1471ec44ec8 /apps/app_controlplayback.c | |
parent | 5f3db1b218918d03622e077a6273880b8cb0e043 (diff) |
More formatting fixes
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@3088 f38db490-d61c-443f-a65b-d21fe96a405b
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); |