svn commit: samba r5370 - in branches/SAMBA_4_0/source/lib/events: .

tridge at samba.org tridge at samba.org
Sun Feb 13 08:52:12 GMT 2005


Author: tridge
Date: 2005-02-13 08:52:12 +0000 (Sun, 13 Feb 2005)
New Revision: 5370

WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=5370

Log:
epoll gives more precise event bits like EPOLLHUP instead of just EPOLLIN. We need to map
these to "read" events for the events code to work on errors like connection refused
(thanks to vl for noticing this bug)

Modified:
   branches/SAMBA_4_0/source/lib/events/events.c


Changeset:
Modified: branches/SAMBA_4_0/source/lib/events/events.c
===================================================================
--- branches/SAMBA_4_0/source/lib/events/events.c	2005-02-13 00:59:26 UTC (rev 5369)
+++ branches/SAMBA_4_0/source/lib/events/events.c	2005-02-13 08:52:12 UTC (rev 5370)
@@ -404,7 +404,8 @@
 			epoll_fallback_to_select(ev, "epoll_wait() gave bad data");
 			return -1;
 		}
-		if (events[i].events & EPOLLIN) flags |= EVENT_FD_READ;
+		if (events[i].events & (EPOLLIN|EPOLLHUP|EPOLLERR)) 
+			flags |= EVENT_FD_READ;
 		if (events[i].events & EPOLLOUT) flags |= EVENT_FD_WRITE;
 		if (flags) {
 			fde->handler(ev, fde, flags, fde->private);



More information about the samba-cvs mailing list