No subject
Thu Jan 15 22:29:28 CST 2009
........
................
Modified:
branches/1.6.0/ (props changed)
branches/1.6.0/main/channel.c
Propchange: branches/1.6.0/
------------------------------------------------------------------------------
Binary property 'trunk-merged' - no diff available.
Modified: branches/1.6.0/main/channel.c
URL: http://svn.digium.com/svn-view/asterisk/branches/1.6.0/main/channel.c?view=diff&rev=179610&r1=179609&r2=179610
==============================================================================
--- branches/1.6.0/main/channel.c (original)
+++ branches/1.6.0/main/channel.c Tue Mar 3 07:55:34 2009
@@ -2448,6 +2448,12 @@
usleep(1);
}
+ if (chan->fdno == -1) {
+ ast_log(LOG_ERROR, "ast_read() called with no recorded file descriptor.\n");
+ f = &ast_null_frame;
+ goto done;
+ }
+
if (chan->masq) {
if (ast_do_masquerade(chan))
ast_log(LOG_WARNING, "Failed to perform masquerade\n");
@@ -2463,6 +2469,12 @@
goto done;
}
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 */
More information about the asterisk-commits
mailing list