Wed Jun 10 08:00:54 PDT 2009
- Previous message: [Slony1-commit] slony1-engine/doc/adminguide adminscripts.sgml
- Next message: [Slony1-commit] slony1-engine/src/slon scheduler.c
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Update of /home/cvsd/slony1/slony1-engine/src/slon
In directory main.slony.info:/tmp/cvs-serv7382
Modified Files:
scheduler.c
Log Message:
Applied patch from Oleg A. Mamontov:
> there is a logical mistake in slon/scheduler.c, in sched_mainloop
> fdsets copied
> for select before checking connections for their timeouts. In timeout
> case this
> descriptors will be removed with DLLIST_REMOVE and sched_remove_fdset,
> but stayed in
> select descriptors bit vector.
Good work, thank you.
Jan
Index: scheduler.c
===================================================================
RCS file: /home/cvsd/slony1/slony1-engine/src/slon/scheduler.c,v
retrieving revision 1.26
retrieving revision 1.27
diff -C2 -d -r1.26 -r1.27
*** scheduler.c 28 May 2008 19:09:37 -0000 1.26
--- scheduler.c 10 Jun 2009 15:00:52 -0000 1.27
***************
*** 423,439 ****
/*
- * Make copies of the file descriptor sets for select(2)
- */
- FD_ZERO(&rfds);
- FD_ZERO(&wfds);
- for (i = 0; i < sched_numfd; i++)
- {
- if (FD_ISSET(i, &sched_fdset_read))
- FD_SET(i, &rfds);
- if (FD_ISSET(i, &sched_fdset_write))
- FD_SET(i, &wfds);
- }
-
- /*
* Check if any of the connections in the wait queue have reached
* their timeout. While doing so, we also remember the closest timeout
--- 423,426 ----
***************
*** 527,530 ****
--- 514,530 ----
/*
+ * Make copies of the file descriptor sets for select(2)
+ */
+ FD_ZERO(&rfds);
+ FD_ZERO(&wfds);
+ for (i = 0; i < sched_numfd; i++)
+ {
+ if (FD_ISSET(i, &sched_fdset_read))
+ FD_SET(i, &rfds);
+ if (FD_ISSET(i, &sched_fdset_write))
+ FD_SET(i, &wfds);
+ }
+
+ /*
* Do the select(2) while unlocking the master lock.
*/
- Previous message: [Slony1-commit] slony1-engine/doc/adminguide adminscripts.sgml
- Next message: [Slony1-commit] slony1-engine/src/slon scheduler.c
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Slony1-commit mailing list