mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-05 12:16:00 +00:00
Version 0.1.12 from FTP
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@449 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
12
file.c
12
file.c
@@ -63,7 +63,7 @@ struct ast_filestream {
|
|||||||
struct ast_tranlator_pvt *tr;
|
struct ast_tranlator_pvt *tr;
|
||||||
};
|
};
|
||||||
|
|
||||||
static pthread_mutex_t formatlock = PTHREAD_MUTEX_INITIALIZER;
|
static pthread_mutex_t formatlock = AST_MUTEX_INITIALIZER;
|
||||||
|
|
||||||
static struct ast_format *formats = NULL;
|
static struct ast_format *formats = NULL;
|
||||||
|
|
||||||
@@ -503,7 +503,7 @@ char ast_waitstream(struct ast_channel *c, char *breakon)
|
|||||||
res = ast_sched_wait(c->sched);
|
res = ast_sched_wait(c->sched);
|
||||||
if (res < 0) {
|
if (res < 0) {
|
||||||
ast_closestream(c->stream);
|
ast_closestream(c->stream);
|
||||||
return 0;
|
break;
|
||||||
}
|
}
|
||||||
res = ast_waitfor(c, res);
|
res = ast_waitfor(c, res);
|
||||||
if (res < 0) {
|
if (res < 0) {
|
||||||
@@ -522,9 +522,10 @@ char ast_waitstream(struct ast_channel *c, char *breakon)
|
|||||||
switch(fr->frametype) {
|
switch(fr->frametype) {
|
||||||
case AST_FRAME_DTMF:
|
case AST_FRAME_DTMF:
|
||||||
res = fr->subclass;
|
res = fr->subclass;
|
||||||
|
if (strchr(breakon, res)) {
|
||||||
ast_frfree(fr);
|
ast_frfree(fr);
|
||||||
if (strchr(breakon, res))
|
|
||||||
return res;
|
return res;
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case AST_FRAME_CONTROL:
|
case AST_FRAME_CONTROL:
|
||||||
switch(fr->subclass) {
|
switch(fr->subclass) {
|
||||||
@@ -538,15 +539,14 @@ char ast_waitstream(struct ast_channel *c, char *breakon)
|
|||||||
default:
|
default:
|
||||||
ast_log(LOG_WARNING, "Unexpected control subclass '%d'\n", fr->subclass);
|
ast_log(LOG_WARNING, "Unexpected control subclass '%d'\n", fr->subclass);
|
||||||
}
|
}
|
||||||
default:
|
}
|
||||||
/* Ignore */
|
/* Ignore */
|
||||||
ast_frfree(fr);
|
ast_frfree(fr);
|
||||||
}
|
|
||||||
} else
|
} else
|
||||||
ast_sched_runq(c->sched);
|
ast_sched_runq(c->sched);
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
return 0;
|
return (c->softhangup ? -1 : 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user