Rev 228: fixed a lib/events bug found by volker in http://samba.org/~tridge/ctdb

tridge at samba.org tridge at samba.org
Tue May 1 20:50:12 GMT 2007


------------------------------------------------------------
revno: 228
revision-id: tridge at samba.org-20070501205012-nlrvpj4m3znvumdz
parent: tridge at samba.org-20070501032502-6fk64ptyeqjybf45
committer: Andrew Tridgell <tridge at samba.org>
branch nick: tridge
timestamp: Wed 2007-05-02 06:50:12 +1000
message:
  fixed a lib/events bug found by volker
modified:
  lib/events/events_standard.c   events_standard.c-20061117234101-o3qt14umlg9en8z0-30
=== modified file 'lib/events/events_standard.c'
--- a/lib/events/events_standard.c	2006-11-17 23:41:20 +0000
+++ b/lib/events/events_standard.c	2007-05-01 20:50:12 +0000
@@ -377,9 +377,10 @@
 	fde->additional_data	= NULL;
 
 	DLIST_ADD(std_ev->fd_events, fde);
-	if (fde->fd > std_ev->maxfd) {
-		std_ev->maxfd = fde->fd;
-	}
+	if ((std_ev->maxfd != EVENT_INVALID_MAXFD)
+	    && (fde->fd > std_ev->maxfd)) {
+ 		std_ev->maxfd = fde->fd;
+ 	}
 	talloc_set_destructor(fde, std_event_fd_destructor);
 
 	epoll_add_event(std_ev, fde);



More information about the samba-cvs mailing list