[svn-commits] file: branch 1.4 r179671 - /branches/1.4/main/channel.c

SVN commits to the Digium repositories svn-commits at lists.digium.com
Tue Mar 3 08:38:57 CST 2009


Author: file
Date: Tue Mar  3 08:38:09 2009
New Revision: 179671

URL: http://svn.digium.com/svn-view/asterisk?view=rev&rev=179671
Log:
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.

Modified:
    branches/1.4/main/channel.c

Modified: branches/1.4/main/channel.c
URL: http://svn.digium.com/svn-view/asterisk/branches/1.4/main/channel.c?view=diff&rev=179671&r1=179670&r2=179671
==============================================================================
--- branches/1.4/main/channel.c (original)
+++ branches/1.4/main/channel.c Tue Mar  3 08:38:09 2009
@@ -2061,12 +2061,6 @@
 	}
 	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) {
@@ -2190,6 +2184,12 @@
 		else
 			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




More information about the svn-commits mailing list