BasicAuthQueueNode *tmpnode;
char *t = NULL;
void *cbdata;
- debugs(29, 9, HERE << "{" << (reply ? reply : "<NULL>") << "}");
+ debugs(29, 5, HERE << "{" << (reply ? reply : "<NULL>") << "}");
if (reply) {
if ((t = strchr(reply, ' ')))
void
ClientRequestContext::clientRedirectStart()
{
- debugs(33, 5, "clientRedirectStart: '" << http->uri << "'");
+ debugs(33, 5, HERE << "'" << http->uri << "'");
if (Config.accessList.redirector) {
acl_checklist = clientAclChecklistCreate(Config.accessList.redirector, http);
Comm::SetSelect(int fd, unsigned int type, PF * handler, void *client_data, time_t timeout)
{
assert(fd >= 0);
- debugs(
- 5,
- DEBUG_DEVPOLL ? 0 : 8,
- HERE << "FD " << fd << ",type=" << type
- << ",handler=" << handler << ",client_data=" << client_data
- << ",timeout=" << timeout << ")"
- );
+ debugs(5, 5, HERE << "FD " << fd << ", type=" << type <<
+ ", handler=" << handler << ", client_data=" << client_data <<
+ ", timeout=" << timeout);
/* POLLIN/POLLOUT are defined in <sys/poll.h> */
fde *F = &fd_table[fd];
struct epoll_event ev;
assert(fd >= 0);
- debugs(5, DEBUG_EPOLL ? 0 : 8, HERE << "FD " << fd << ", type=" << type <<
+ debugs(5, 5, HERE << "FD " << fd << ", type=" << type <<
", handler=" << handler << ", client_data=" << client_data <<
", timeout=" << timeout);
fde *F = &fd_table[fd];
assert(fd >= 0);
assert(F->flags.open);
+ debugs(5, 5, HERE << "FD " << fd << ", type=" << type <<
+ ", handler=" << handler << ", client_data=" << client_data <<
+ ", timeout=" << timeout);
if (type & COMM_SELECT_READ) {
kq_update_events(fd, EVFILT_READ, handler);
fde *F = &fd_table[fd];
assert(fd >= 0);
assert(F->flags.open);
- debugs(5, 5, "commSetSelect: FD " << fd << " type " << type);
+ debugs(5, 5, HERE << "FD " << fd << ", type=" << type <<
+ ", handler=" << handler << ", client_data=" << client_data <<
+ ", timeout=" << timeout);
if (type & COMM_SELECT_READ) {
F->read_handler = handler;
}
if (revents & (POLLWRNORM | POLLOUT | POLLHUP | POLLERR)) {
- debugs(5, 5, "comm_poll: FD " << fd << " ready for writing");
+ debugs(5, 6, "comm_poll: FD " << fd << " ready for writing");
if ((hdl = F->write_handler)) {
PROF_start(comm_write_handler);
fde *F = &fd_table[fd];
assert(fd >= 0);
assert(F->flags.open);
- debugs(5, 5, HERE << "FD " << fd << " type " << type);
+ debugs(5, 5, HERE << "FD " << fd << ", type=" << type <<
+ ", handler=" << handler << ", client_data=" << client_data <<
+ ", timeout=" << timeout);
if (type & COMM_SELECT_READ) {
F->read_handler = handler;
}
F = &fd_table[fd];
- debugs(5, 5, "comm_select: FD " << fd << " ready for writing");
+ debugs(5, 6, "comm_select: FD " << fd << " ready for writing");
if ((hdl = F->write_handler)) {
F->write_handler = NULL;
fde *F = &fd_table[fd];
assert(fd >= 0);
assert(F->flags.open);
- debugs(5, 5, "commSetSelect: FD " << fd << " type " << type);
+ debugs(5, 5, HERE << "FD " << fd << ", type=" << type <<
+ ", handler=" << handler << ", client_data=" << client_data <<
+ ", timeout=" << timeout);
if (type & COMM_SELECT_READ) {
F->read_handler = handler;
}
F = &fd_table[fd];
- debugs(5, 5, "comm_select: FD " << fd << " ready for writing");
+ debugs(5, 6, "comm_select: FD " << fd << " ready for writing");
if ((hdl = F->write_handler)) {
F->write_handler = NULL;
assert(fm->max_n_files <= (1 << 24)); /* swap_filen is 25 bits, signed */
fm->nwords = fm->max_n_files >> LONG_BIT_SHIFT;
debugs(8, 3, "file_map_grow: creating space for " << fm->max_n_files << " files");
+ debugs(8, 5, "--> " << fm->nwords << " words of " << sizeof(*fm->file_map) << " bytes each");
fm->file_map = (unsigned long *)xcalloc(fm->nwords, sizeof(*fm->file_map));
debugs(8, 3, "copying " << old_sz << " old bytes");
memcpy(fm->file_map, old_map, old_sz);
if (code == 125 || (code == 150 && Comm::IsConnOpen(ftpState->data.conn))) {
/* Begin data transfer */
- debugs(9, 3, HERE << "reading data channel");
+ debugs(9, 3, HERE << "begin data transfer from " << ftpState->data.conn->remote << " (" << ftpState->data.conn->local << ")");
ftpState->switchTimeoutToDataChannel();
ftpState->maybeReadVirginBody();
ftpState->state = READING_DATA;
dlink_node *n;
helper_server *srv;
helper_server *selected = NULL;
+ debugs(84, 5, "GetFirstAvailable: Running servers " << hlp->childs.n_running);
if (hlp->childs.n_running == 0)
return NULL;
}
/* Check for overload */
- if (!selected)
+ if (!selected) {
+ debugs(84, 5, "GetFirstAvailable: None available.");
return NULL;
+ }
- if (selected->stats.pending >= (hlp->childs.concurrency ? hlp->childs.concurrency : 1))
+ if (selected->stats.pending >= (hlp->childs.concurrency ? hlp->childs.concurrency : 1)) {
+ debugs(84, 3, "GetFirstAvailable: Least-loaded helper is overloaded!");
return NULL;
+ }
+ debugs(84, 5, "GetFirstAvailable: returning srv-" << selected->index);
return selected;
}
}
static void
-
htcpHandleTstRequest(htcpDataHeader * dhdr, char *buf, int sz, Ip::Address &from)
{
/* buf should be a SPECIFIER */
s->setDataHeader(dhdr);
if (NULL == s) {
- debugs(31, 2, "htcpHandleTstRequest: htcpUnpackSpecifier failed");
+ debugs(31, 3, "htcpHandleTstRequest: htcpUnpackSpecifier failed");
htcpLogHtcp(from, dhdr->opcode, LOG_UDP_INVALID, dash_str);
return;
}
if (!s->request) {
- debugs(31, 2, "htcpHandleTstRequest: failed to parse request");
+ debugs(31, 3, "htcpHandleTstRequest: failed to parse request");
htcpLogHtcp(from, dhdr->opcode, LOG_UDP_INVALID, dash_str);
htcpFreeSpecifier(s);
return;
}
if (!htcpAccessAllowed(Config.accessList.htcp, s, from)) {
- debugs(31, 2, "htcpHandleTstRequest: Access denied");
+ debugs(31, 3, "htcpHandleTstRequest: Access denied");
htcpLogHtcp(from, dhdr->opcode, LOG_UDP_DENIED, s->uri);
htcpFreeSpecifier(s);
return;
}
- debugs(31, 3, "htcpHandleTstRequest: " << s->method << " " << s->uri << " " << s->version);
- debugs(31, 3, "htcpHandleTstRequest: " << s->req_hdrs);
+ debugs(31, 2, "HTCP TST request: " << s->method << " " << s->uri << " " << s->version);
+ debugs(31, 2, "HTCP TST headers: " << s->req_hdrs);
s->checkHit();
}
htcpSpecifier *s;
/* buf[0/1] is reserved and reason */
int reason = buf[1] << 4;
- debugs(31, 3, "htcpHandleClr: reason=" << reason);
+ debugs(31, 2, "HTCP CLR reason: " << reason);
buf += 2;
sz -= 2;
}
if (!s->request) {
- debugs(31, 2, "htcpHandleTstRequest: failed to parse request");
+ debugs(31, 3, "htcpHandleTstRequest: failed to parse request");
htcpLogHtcp(from, hdr->opcode, LOG_UDP_INVALID, dash_str);
htcpFreeSpecifier(s);
return;
}
if (!htcpAccessAllowed(Config.accessList.htcp_clr, s, from)) {
- debugs(31, 2, "htcpHandleClr: Access denied");
+ debugs(31, 3, "htcpHandleClr: Access denied");
htcpLogHtcp(from, hdr->opcode, LOG_UDP_DENIED, s->uri);
htcpFreeSpecifier(s);
return;
}
- debugs(31, 5, "htcpHandleClr: " << s->method << " " << s->uri << " " << s->version);
- debugs(31, 5, "htcpHandleClr: request headers: " << s->req_hdrs);
+ debugs(31, 2, "HTCP CLR request: " << s->method << " " << s->uri << " " << s->version);
+ debugs(31, 2, "HTCP CLR headers: " << s->req_hdrs);
/* Release objects from cache
* analog to clientPurgeRequest in client_side.c
return -1;
}
+ debugs(14, 3, "ipcacheParse: " << nr << " answers for '" << name << "'");
assert(answers);
for (k = 0; k < nr; k++) {
assert(fetch->entry && fetch->request);
if (fetch->old_entry) {
- debugs(72, 2, "peerDigestFetchFinish: deleting old entry");
+ debugs(72, 3, "peerDigestFetchFinish: deleting old entry");
storeUnregister(fetch->old_sc, fetch->old_entry, fetch);
fetch->old_entry->releaseRequest();
fetch->old_entry->unlock();
debugs(83, 5, "Using SSLv2.");
method = SSLv2_server_method();
#else
- debugs(83, 1, "SSLv2 is not available in this Proxy.");
+ debugs(83, DBG_IMPORTANT, "SSLv2 is not available in this Proxy.");
return NULL;
#endif
break;
}
}
- debugs(83, 1, "Using certificate in " << certfile);
+ debugs(83, DBG_IMPORTANT, "Using certificate in " << certfile);
if (!SSL_CTX_use_certificate_chain_file(sslContext, certfile)) {
ssl_error = ERR_get_error();
- debugs(83, 0, "Failed to acquire SSL certificate '" << certfile << "': " << ERR_error_string(ssl_error, NULL) );
- goto error;
+ debugs(83, DBG_CRITICAL, "ERROR: Failed to acquire SSL certificate '" << certfile << "': " << ERR_error_string(ssl_error, NULL));
+ SSL_CTX_free(sslContext);
+ return NULL;
}
- debugs(83, 1, "Using private key in " << keyfile);
+ debugs(83, DBG_IMPORTANT, "Using private key in " << keyfile);
ssl_ask_password(sslContext, keyfile);
if (!SSL_CTX_use_PrivateKey_file(sslContext, keyfile, SSL_FILETYPE_PEM)) {
ssl_error = ERR_get_error();
- debugs(83, 0, "Failed to acquire SSL private key '" << keyfile << "': " << ERR_error_string(ssl_error, NULL) );
- goto error;
+ debugs(83, DBG_CRITICAL, "ERROR: Failed to acquire SSL private key '" << keyfile << "': " << ERR_error_string(ssl_error, NULL));
+ SSL_CTX_free(sslContext);
+ return NULL;
}
debugs(83, 5, "Comparing private and public SSL keys.");
if (!SSL_CTX_check_private_key(sslContext)) {
ssl_error = ERR_get_error();
- debugs(83, 0, "SSL private key '" <<
- certfile << "' does not match public key '" <<
- keyfile << "': " << ERR_error_string(ssl_error, NULL) );
- goto error;
+ debugs(83, DBG_CRITICAL, "ERROR: SSL private key '" << certfile << "' does not match public key '" <<
+ keyfile << "': " << ERR_error_string(ssl_error, NULL));
+ SSL_CTX_free(sslContext);
+ return NULL;
}
debugs(83, 9, "Setting RSA key generation callback.");
if ((CAfile || CApath) && !SSL_CTX_load_verify_locations(sslContext, CAfile, CApath)) {
ssl_error = ERR_get_error();
- debugs(83, 1, "Error setting CA certificate locations: " << ERR_error_string(ssl_error, NULL) );
- debugs(83, 1, "continuing anyway..." );
+ debugs(83, DBG_IMPORTANT, "WARNING: Ignoring error setting CA certificate locations: " << ERR_error_string(ssl_error, NULL));
}
if (!(fl & SSL_FLAG_NO_DEFAULT_CA) &&
!SSL_CTX_set_default_verify_paths(sslContext)) {
ssl_error = ERR_get_error();
- debugs(83, 1, "Error setting default CA certificate location: " << ERR_error_string(ssl_error, NULL) );
- debugs(83, 1, "continuing anyway..." );
+ debugs(83, DBG_IMPORTANT, "WARNING: Ignoring error setting default CA certificate location: " << ERR_error_string(ssl_error, NULL));
}
if (clientCA) {
cert_names = SSL_load_client_CA_file(clientCA);
if (cert_names == NULL) {
- debugs(83, 1, "Error loading the client CA certificates from '" << clientCA << "\': " << ERR_error_string(ERR_get_error(),NULL) );
- goto error;
+ debugs(83, DBG_IMPORTANT, "ERROR: loading the client CA certificates from '" << clientCA << "\': " << ERR_error_string(ERR_get_error(),NULL));
+ SSL_CTX_free(sslContext);
+ return NULL;
}
ERR_clear_error();
}
if (!dh)
- debugs(83, 1, "WARNING: Failed to read DH parameters '" << dhfile << "'");
+ debugs(83, DBG_IMPORTANT, "WARNING: Failed to read DH parameters '" << dhfile << "'");
else if (dh && DH_check(dh, &codes) == 0) {
if (codes) {
- debugs(83, 1, "WARNING: Failed to verify DH parameters '" << dhfile << "' (" << std::hex << codes << ")");
+ debugs(83, DBG_IMPORTANT, "WARNING: Failed to verify DH parameters '" << dhfile << "' (" << std::hex << codes << ")");
DH_free(dh);
dh = NULL;
}
SSL_CTX_set_ex_data(sslContext, ssl_ctx_ex_index_dont_verify_domain, (void *) -1);
return sslContext;
-
-error:
- SSL_CTX_free(sslContext);
-
- return NULL;
}
SSL_CTX *
debugs(83, 5, "Using SSLv2.");
method = SSLv2_client_method();
#else
- debugs(83, 1, "SSLv2 is not available in this Proxy.");
+ debugs(83, DBG_IMPORTANT, "SSLv2 is not available in this Proxy.");
return NULL;
#endif
break;
SSL_CTX_set_tmp_rsa_callback(sslContext, ssl_temp_rsa_cb);
if (fl & SSL_FLAG_DONT_VERIFY_PEER) {
- debugs(83, 1, "NOTICE: Peer certificates are not verified for validity!");
+ debugs(83, 2, "NOTICE: Peer certificates are not verified for validity!");
SSL_CTX_set_verify(sslContext, SSL_VERIFY_NONE, NULL);
} else {
debugs(83, 9, "Setting certificate verification callback.");
if ((CAfile || CApath) && !SSL_CTX_load_verify_locations(sslContext, CAfile, CApath)) {
ssl_error = ERR_get_error();
- debugs(83, 1, "Error setting CA certificate locations: " << ERR_error_string(ssl_error, NULL));
- debugs(83, 1, "continuing anyway..." );
+ debugs(83, DBG_IMPORTANT, "WARNING: Ignoring error setting CA certificate locations: " << ERR_error_string(ssl_error, NULL));
}
if (CRLfile) {
if (!(fl & SSL_FLAG_NO_DEFAULT_CA) &&
!SSL_CTX_set_default_verify_paths(sslContext)) {
ssl_error = ERR_get_error();
- debugs(83, 1, "Error setting default CA certificate location: " << ERR_error_string(ssl_error, NULL) );
- debugs(83, 1, "continuing anyway...");
+ debugs(83, DBG_IMPORTANT, "WARNING: Ignoring error setting default CA certificate location: " << ERR_error_string(ssl_error, NULL));
}
return sslContext;