[Asterisk-cvs] asterisk channel.c,1.189,1.190

kpfleming at lists.digium.com kpfleming at lists.digium.com
Thu Apr 21 20:49:48 CDT 2005


Update of /usr/cvsroot/asterisk
In directory mongoose.digium.com:/tmp/cvs-serv12538

Modified Files:
	channel.c 
Log Message:
initialize errno and don't report an error when poll() returns without indicating one (bug #4059)


Index: channel.c
===================================================================
RCS file: /usr/cvsroot/asterisk/channel.c,v
retrieving revision 1.189
retrieving revision 1.190
diff -u -d -r1.189 -r1.190
--- channel.c	21 Apr 2005 06:02:43 -0000	1.189
+++ channel.c	22 Apr 2005 01:40:23 -0000	1.190
@@ -1251,9 +1251,10 @@
 		return -1;
 	/* Wait for a digit, no more than ms milliseconds total. */
 	while(ms) {
+		errno = 0;
 		rchan = ast_waitfor_nandfds(&c, 1, &cmdfd, (cmdfd > -1) ? 1 : 0, NULL, &outfd, &ms);
 		if ((!rchan) && (outfd < 0) && (ms)) { 
-			if (errno == EINTR)
+			if (errno == 0 || errno == EINTR)
 				continue;
 			ast_log(LOG_WARNING, "Wait failed (%s)\n", strerror(errno));
 			return -1;




More information about the svn-commits mailing list