diff options
Diffstat (limited to 'main/channel.c')
-rw-r--r-- | main/channel.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/main/channel.c b/main/channel.c index b13e79dd6..d788e79a2 100644 --- a/main/channel.c +++ b/main/channel.c @@ -2515,12 +2515,14 @@ static struct ast_frame *__ast_read(struct ast_channel *chan, int dropaudio) /* save a copy of func/data before unlocking the channel */ int (*func)(const void *) = chan->timingfunc; void *data = chan->timingdata; + chan->fdno = -1; ast_channel_unlock(chan); func(data); } else { blah = 0; ioctl(chan->timingfd, DAHDI_TIMERCONFIG, &blah); chan->timingdata = NULL; + chan->fdno = -1; ast_channel_unlock(chan); } /* cannot 'goto done' because the channel is already unlocked */ @@ -2538,6 +2540,7 @@ static struct ast_frame *__ast_read(struct ast_channel *chan, int dropaudio) chan->generator->generate(chan, tmp, -1, -1); chan->generatordata = tmp; f = &ast_null_frame; + chan->fdno = -1; goto done; } @@ -2595,7 +2598,7 @@ static struct ast_frame *__ast_read(struct ast_channel *chan, int dropaudio) ast_log(LOG_WARNING, "No read routine on channel %s\n", chan->name); } - /* + /* * Reset the recorded file descriptor that triggered this read so that we can * easily detect when ast_read() is called without properly using ast_waitfor(). */ |