[srvx-commits] CVS: services/src sockcheck.c,1.54.2.15,1.54.2.16
Brought to you by:
entrope
From: Miles P. <pet...@us...> - 2001-08-11 21:48:20
|
Update of /cvsroot/srvx/services/src In directory usw-pr-cvs1:/tmp/cvs-serv15916 Modified Files: Tag: rel-1_0 sockcheck.c Log Message: fully functional sockcheck.. weeeee! Index: sockcheck.c =================================================================== RCS file: /cvsroot/srvx/services/src/sockcheck.c,v retrieving revision 1.54.2.15 retrieving revision 1.54.2.16 diff -C2 -r1.54.2.15 -r1.54.2.16 *** sockcheck.c 2001/08/11 20:59:53 1.54.2.15 --- sockcheck.c 2001/08/11 21:48:16 1.54.2.16 *************** *** 453,462 **** client->read_pos = 0; client->read_used = 0; - client->read_timeout.tv_sec = tv_now.tv_sec + client->state->timeout / 1000; - client->read_timeout.tv_usec = tv_now.tv_usec + (client->state->timeout % 1000) * 1000; - if (client->read_timeout.tv_usec > 1000000) { - client->read_timeout.tv_sec++; - client->read_timeout.tv_usec -= 1000000; - } #if SOCKCHECK_DEBUG log(PC_LOG, LOG_INFO, "elaborated state: "); --- 453,456 ---- *************** *** 482,485 **** --- 476,487 ---- return; } + + client->read_timeout.tv_sec = tv_now.tv_sec + client->state->timeout / 1000; + client->read_timeout.tv_usec = tv_now.tv_usec + (client->state->timeout % 1000) * 1000; + if (client->read_timeout.tv_usec > 1000000) { + client->read_timeout.tv_sec++; + client->read_timeout.tv_usec -= 1000000; + } + poller->events = POLLIN | POLLOUT; poller->revents = 0; /* otherwise we get confused this poll iteration.. */ *************** *** 665,669 **** /* See if what's been read matches any of the expected responses */ ! while (client->read_pos < client->read_used) { unsigned char curr, bleh; const unsigned char *resp_state; --- 667,671 ---- /* See if what's been read matches any of the expected responses */ ! while (client->read_pos <= client->read_used) { unsigned char curr, bleh; const unsigned char *resp_state; |