mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-29 18:19:30 +00:00
More formatting fixes
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3088 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
10
app.c
10
app.c
@@ -409,7 +409,6 @@ int ast_linear_stream(struct ast_channel *chan, const char *filename, int fd, in
|
||||
|
||||
int ast_control_streamfile(struct ast_channel *chan, char *file, char *fwd, char *rev, char *stop, char *pause, int skipms)
|
||||
{
|
||||
|
||||
struct timeval started, ended;
|
||||
long elapsed = 0,last_elapsed =0;
|
||||
char breaks[5];
|
||||
@@ -418,7 +417,6 @@ int ast_control_streamfile(struct ast_channel *chan, char *file,char *fwd,char *
|
||||
if (chan->_state != AST_STATE_UP)
|
||||
res = ast_answer(chan);
|
||||
|
||||
|
||||
if (stop != NULL && stop[0]) {
|
||||
breaks[x++] = stop[0];
|
||||
}
|
||||
@@ -442,13 +440,11 @@ int ast_control_streamfile(struct ast_channel *chan, char *file,char *fwd,char *
|
||||
ast_stream_fastforward(chan->stream, elapsed);
|
||||
last_elapsed = elapsed - 200;
|
||||
}
|
||||
if(res) {
|
||||
if (res)
|
||||
res = ast_waitstream_fr(chan, breaks, fwd, rev, skipms);
|
||||
}
|
||||
else {
|
||||
else
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (res < 1)
|
||||
break;
|
||||
@@ -480,6 +476,4 @@ int ast_control_streamfile(struct ast_channel *chan, char *file,char *fwd,char *
|
||||
ast_stopstream(chan);
|
||||
|
||||
return res;
|
||||
|
||||
}
|
||||
|
||||
|
@@ -57,13 +57,11 @@ 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;
|
||||
|
||||
@@ -105,7 +103,6 @@ static int controlplayback_exec(struct ast_channel *chan, void *data)
|
||||
if (pause && !is_on_phonepad(*pause))
|
||||
pause = NULL;
|
||||
|
||||
|
||||
LOCAL_USER_ADD(u);
|
||||
|
||||
res = ast_control_streamfile(chan, file, fwd, rev, stop, pause, skipms);
|
||||
|
Reference in New Issue
Block a user