|
|
@ -415,7 +415,7 @@ int ast_control_streamfile(struct ast_channel *chan, char *file, char *fwd, char
|
|
|
|
{
|
|
|
|
{
|
|
|
|
struct timeval started, ended;
|
|
|
|
struct timeval started, ended;
|
|
|
|
long elapsed = 0,last_elapsed =0;
|
|
|
|
long elapsed = 0,last_elapsed =0;
|
|
|
|
char *breaks;
|
|
|
|
char *breaks=NULL;
|
|
|
|
int blen=2;
|
|
|
|
int blen=2;
|
|
|
|
int res=0;
|
|
|
|
int res=0;
|
|
|
|
|
|
|
|
|
|
|
@ -424,11 +424,12 @@ int ast_control_streamfile(struct ast_channel *chan, char *file, char *fwd, char
|
|
|
|
if (pause)
|
|
|
|
if (pause)
|
|
|
|
blen += strlen(pause);
|
|
|
|
blen += strlen(pause);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if(blen > 2) {
|
|
|
|
breaks = alloca(blen + 1);
|
|
|
|
breaks = alloca(blen + 1);
|
|
|
|
breaks[0] = '\0';
|
|
|
|
breaks[0] = '\0';
|
|
|
|
strcat(breaks, stop);
|
|
|
|
strcat(breaks, stop);
|
|
|
|
strcat(breaks, pause);
|
|
|
|
strcat(breaks, pause);
|
|
|
|
|
|
|
|
}
|
|
|
|
if (chan->_state != AST_STATE_UP)
|
|
|
|
if (chan->_state != AST_STATE_UP)
|
|
|
|
res = ast_answer(chan);
|
|
|
|
res = ast_answer(chan);
|
|
|
|
|
|
|
|
|
|
|
|