aboutsummaryrefslogtreecommitdiffstats
path: root/file.c
diff options
context:
space:
mode:
authormarkster <markster@f38db490-d61c-443f-a65b-d21fe96a405b>2003-06-29 21:54:58 +0000
committermarkster <markster@f38db490-d61c-443f-a65b-d21fe96a405b>2003-06-29 21:54:58 +0000
commit07df1a38015e29d444d34f83daf7af09b45bf6a5 (patch)
treec6d0463a8475d4ddec5b2f3ca87b0ffa82fc24ca /file.c
parentce56e9aea71fb712d1b859f1c9903dd06032034d (diff)
Minor cleanups
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@1138 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'file.c')
-rwxr-xr-xfile.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/file.c b/file.c
index 6b199f982..284c68292 100755
--- a/file.c
+++ b/file.c
@@ -826,8 +826,6 @@ char ast_waitstream(struct ast_channel *c, char *breakon)
ast_frfree(fr);
}
ast_sched_runq(c->sched);
-
-
}
return (c->_softhangup ? -1 : 0);
}
@@ -838,13 +836,15 @@ char ast_waitstream_fr(struct ast_channel *c, char *breakon, char *forward, char
struct ast_frame *fr;
while(c->stream) {
res = ast_sched_wait(c->sched);
- if (res < 0) {
+ if ((res < 0) && !c->timingfunc) {
if (c->stream)
ast_closestream(c->stream);
if (c->vstream)
ast_closestream(c->vstream);
break;
}
+ if (res < 0)
+ res = 1000;
res = ast_waitfor(c, res);
if (res < 0) {
ast_log(LOG_WARNING, "Select failed (%s)\n", strerror(errno));
@@ -904,13 +904,15 @@ char ast_waitstream_full(struct ast_channel *c, char *breakon, int audiofd, int
while(c->stream) {
ms = ast_sched_wait(c->sched);
- if (ms < 0) {
+ if ((ms < 0) && !c->timingfunc) {
if (c->stream)
ast_closestream(c->stream);
if (c->vstream)
ast_closestream(c->vstream);
break;
}
+ if (ms < 0)
+ ms = 1000;
rchan = ast_waitfor_nandfds(&c, 1, &cmdfd, (cmdfd > -1) ? 1 : 0, NULL, &outfd, &ms);
if (!rchan && (outfd < 0) && (ms)) {
ast_log(LOG_WARNING, "Wait failed (%s)\n", strerror(errno));