comparison src/xgselect.c @ 110617:4e2238ed599f

* xgselect.c (xg_select): Clear file descriptors not set from rfds and wfds.
author Jan D <jan.h.d@swipnet.se>
date Sun, 26 Sep 2010 17:39:10 +0200
parents 1d1d5d9bd884
children 6a7fb61524be 376148b31b5e
comparison
equal deleted inserted replaced
110616:cb4b54af7023 110617:4e2238ed599f
111 if (FD_ISSET (i, &all_rfds)) 111 if (FD_ISSET (i, &all_rfds))
112 { 112 {
113 if (rfds && FD_ISSET (i, rfds)) ++retval; 113 if (rfds && FD_ISSET (i, rfds)) ++retval;
114 else ++our_fds; 114 else ++our_fds;
115 } 115 }
116 else if (rfds)
117 FD_CLR (i, rfds);
118
116 if (have_wfds && FD_ISSET (i, &all_wfds)) 119 if (have_wfds && FD_ISSET (i, &all_wfds))
117 { 120 {
118 if (wfds && FD_ISSET (i, wfds)) ++retval; 121 if (wfds && FD_ISSET (i, wfds)) ++retval;
119 else ++our_fds; 122 else ++our_fds;
120 } 123 }
124 else if (wfds)
125 FD_CLR (i, wfds);
126
121 if (efds && FD_ISSET (i, efds)) 127 if (efds && FD_ISSET (i, efds))
122 ++retval; 128 ++retval;
123 } 129 }
124 } 130 }
125 131