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

tridge at samba.org tridge at samba.org
Thu Feb 3 12:26:29 GMT 2005


Author: tridge
Date: 2005-02-03 12:26:28 +0000 (Thu, 03 Feb 2005)
New Revision: 5198

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

Log:
don't consider failure to remove an epoll event as enough reason to
fallback to select(). This can happen in too many situations.


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-03 11:56:03 UTC (rev 5197)
+++ branches/SAMBA_4_0/source/lib/events/events.c	2005-02-03 12:26:28 UTC (rev 5198)
@@ -158,7 +158,7 @@
 */
 static void epoll_fallback_to_select(struct event_context *ev, const char *reason)
 {
-	DEBUG(0,("%s - using select() - %s\n", reason, strerror(errno)));
+	DEBUG(0,("%s (%s) - falling back to select()\n", reason, strerror(errno)));
 	close(ev->epoll_fd);
 	ev->epoll_fd = -1;
 }
@@ -197,9 +197,7 @@
 		ZERO_STRUCT(event);
 		event.events = epoll_map_flags(fde->flags);
 		event.data.ptr = fde;
-		if (epoll_ctl(ev->epoll_fd, EPOLL_CTL_DEL, fde->fd, &event) != 0) {
-			epoll_fallback_to_select(ev, "EPOLL_CTL_DEL failed");
-		}
+		epoll_ctl(ev->epoll_fd, EPOLL_CTL_DEL, fde->fd, &event);
 	}
 #endif
 	return 0;



More information about the samba-cvs mailing list