aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorfile <file@f38db490-d61c-443f-a65b-d21fe96a405b>2009-03-03 14:40:59 +0000
committerfile <file@f38db490-d61c-443f-a65b-d21fe96a405b>2009-03-03 14:40:59 +0000
commit861f2ad22be83563340a69a014e1534f940e0e26 (patch)
tree3371dd5a5cc81778d89502fbb91e931a1fa18a00
parentf19dbc7219974883cb34117c5c720578dd1e755e (diff)
Merged revisions 179672 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk ................ r179672 | file | 2009-03-03 10:40:04 -0400 (Tue, 03 Mar 2009) | 10 lines Merged revisions 179671 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r179671 | file | 2009-03-03 10:38:09 -0400 (Tue, 03 Mar 2009) | 3 lines Move where fdno is set to the default value to *after* the read callback of the channel driver is called. We have to do this as the underlying channel driver may need the fdno value to determine what to read. ........ ................ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.0@179673 f38db490-d61c-443f-a65b-d21fe96a405b
-rw-r--r--main/channel.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/main/channel.c b/main/channel.c
index a41366b1b..b13e79dd6 100644
--- a/main/channel.c
+++ b/main/channel.c
@@ -2470,12 +2470,6 @@ static struct ast_frame *__ast_read(struct ast_channel *chan, int dropaudio)
}
prestate = chan->_state;
- /*
- * 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().
- */
- chan->fdno = -1;
-
/* Read and ignore anything on the alertpipe, but read only
one sizeof(blah) per frame that we send from it */
if (chan->alertpipe[0] > -1) {
@@ -2601,6 +2595,12 @@ 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().
+ */
+ chan->fdno = -1;
+
if (f) {
/* if the channel driver returned more than one frame, stuff the excess
into the readq for the next ast_read call (note that we can safely assume