Update of /cvsroot/srvx/services/src
In directory usw-pr-cvs1:/tmp/cvs-serv29929/src
Modified Files:
Tag: rel-1_0
sockcheck.c
Log Message:
since it's mostly debugged, disable most of the info level statements
Index: sockcheck.c
===================================================================
RCS file: /cvsroot/srvx/services/src/sockcheck.c,v
retrieving revision 1.54.2.23
retrieving revision 1.54.2.24
diff -C2 -r1.54.2.23 -r1.54.2.24
*** sockcheck.c 2001/08/14 15:31:38 1.54.2.23
--- sockcheck.c 2001/08/15 03:21:38 1.54.2.24
***************
*** 436,440 ****
--- 436,442 ----
unsigned int exp_length;
expand_var(client, template[1], &expansion, &exp_length);
+ #if SOCKCHECK_DEBUG
log(PC_LOG, LOG_INFO, "Expanded var %c for client %s to \"%s\" (len %d, pos %d)\n", template[1], client->addr->hostname, expansion, exp_length, client->send_used);
+ #endif
if (client->send_used+exp_length >= client->send_size) {
do {
***************
*** 516,520 ****
--- 518,524 ----
}
}
+ #if SOCKCHECK_DEBUG
log(PC_LOG, LOG_INFO, "Starting proxy check on port %d (test %d) for client %s, fd %d\n", client->state->port, client->test_index, client->addr->hostname, poller->fd);
+ #endif
return;
***************
*** 578,582 ****
--- 582,588 ----
}
if (!tests) return 0;
+ #if SOCKCHECK_DEBUG
log(PC_LOG, LOG_INFO, "Proxy-checking client at %08x (%s) as client %d (now %d in progress)\n", sci->addr, sci->hostname, idx, sockcheck_num_sockets);
+ #endif
client_list[idx] = sockcheck_alloc_client(sci);
client_list[idx]->test_rep = 0;
***************
*** 596,604 ****
--- 602,614 ----
if (decision == ACCEPT) {
/* do nothing */
+ #if SOCKCHECK_DEBUG
log(PC_LOG, LOG_INFO, "Proxy check passed for client at IP %08x hostname %s\n", client->addr->addr, client->addr->hostname);
+ #endif
} else if (decision == REJECT) {
proxies_detected++;
sockcheck_issue_gline(client->addr);
+ #if SOCKCHECK_DEBUG
log(PC_LOG, LOG_INFO, "Proxy check failed for client at IP %08x hostname %s (%s)\n", client->addr->addr, client->addr->hostname, client->addr->reason);
+ #endif
/* don't compare idx != 0 directly, because somebody else may have
* reordered the tests already
***************
*** 730,738 ****
--- 740,752 ----
if (client->read_used >= client->read_size) {
/* we got more data than we expected to get .. don't read any more */
+ #if SOCKCHECK_DEBUG
log(PC_LOG, LOG_INFO, "Buffer filled (unmatched) for client %s\n", client->addr->hostname);
+ #endif
return client->state->responses.used - 1;
} else if (TV_CMP(tv_now, >, client->read_timeout)) {
/* read timed out, use default handler. */
+ #if SOCKCHECK_DEBUG
log(PC_LOG, LOG_INFO, "Read timeout expired for client %s\n", client->addr->hostname);
+ #endif
return client->state->responses.used - 1;
} else {
***************
*** 771,775 ****
--- 785,791 ----
case ECONNREFUSED:
case ETIMEDOUT:
+ #if SOCKCHECK_DEBUG
log(PC_LOG, LOG_INFO, "Client %s gave us errno %d (%s)\n", client->addr->hostname, rc, strerror(rc));
+ #endif
goto disconn;
case 0: break;
|