No subject
Thu Jan 15 22:29:28 CST 2009
........
Modified:
trunk/ (props changed)
trunk/main/channel.c
Propchange: trunk/
------------------------------------------------------------------------------
Binary property 'branch-1.4-merged' - no diff available.
Modified: trunk/main/channel.c
URL: http://svn.digium.com/svn-view/asterisk/trunk/main/channel.c?view=diff&rev=179609&r1=179608&r2=179609
==============================================================================
--- trunk/main/channel.c (original)
+++ trunk/main/channel.c Tue Mar 3 07:54:41 2009
@@ -2467,6 +2467,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");
@@ -2482,6 +2488,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