[svn] commit: r264 - /branches/f2f200910/src/bin/parkinglot/main.cc
BIND 10 source code commits
bind10-changes at lists.isc.org
Fri Oct 30 22:34:59 UTC 2009
Author: jinmei
Date: Fri Oct 30 22:34:59 2009
New Revision: 264
Log:
FD_ZERO/SET must be done everytime before select().
Modified:
branches/f2f200910/src/bin/parkinglot/main.cc
Modified: branches/f2f200910/src/bin/parkinglot/main.cc
==============================================================================
--- branches/f2f200910/src/bin/parkinglot/main.cc (original)
+++ branches/f2f200910/src/bin/parkinglot/main.cc Fri Oct 30 22:34:59 2009
@@ -79,12 +79,12 @@
int ss = session.getSocket();
int nfds = max(ps, ss) + 1;
- FD_ZERO(&fds);
- FD_SET(ps, &fds);
- FD_SET(ss, &fds);
-
cout << "server running" << endl;
while (true) {
+ FD_ZERO(&fds);
+ FD_SET(ps, &fds);
+ FD_SET(ss, &fds);
+
int n = select(nfds, &fds, NULL, NULL, NULL);
if (n < 0)
throw FatalError("select error");
More information about the bind10-changes
mailing list