(main): fix select-loop to decrement ret correctly. from "Brandon
S. Allbery KF8NH" <allbery@ece.cmu.edu> git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@9678 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1997 - 2000 Kungliga Tekniska H<>gskolan
|
||||
* Copyright (c) 1997 - 2001 Kungliga Tekniska H<>gskolan
|
||||
* (Royal Institute of Technology, Stockholm, Sweden).
|
||||
* All rights reserved.
|
||||
*
|
||||
@@ -472,8 +472,9 @@ main(int argc, char **argv)
|
||||
send_diffs (context, p, log_fd, database, current_version);
|
||||
}
|
||||
|
||||
for(p = slaves; p != NULL && ret--; p = p->next)
|
||||
for(p = slaves; p != NULL; p = p->next)
|
||||
if (FD_ISSET(p->fd, &readset)) {
|
||||
--ret;
|
||||
if(process_msg (context, p, log_fd, database, current_version))
|
||||
remove_slave (context, p, &slaves);
|
||||
}
|
||||
|
Reference in New Issue
Block a user