if ((home->limit.max_connections > 0) &&
(home->limit.num_connections >= home->limit.max_connections)) {
WDEBUG("Home server has too many open connections (%d)",
- home->limit.max_connections);
+ home->limit.max_connections);
return NULL;
}
sock->my_port = src_port;
sock->proto = home->proto;
+ /*
+ * For error messages.
+ */
+ this->print(this, buffer, sizeof(buffer));
+
if (debug_flag >= 2) {
- this->print(this, buffer, sizeof(buffer));
- DEBUG("Opening new %s", buffer);
+ DEBUG("Opening new proxy socket '%s'", buffer);
}
#ifdef WITH_TCP
if (this->fd < 0) {
this->print(this, buffer,sizeof(buffer));
- ERROR("Failed opening client socket %s : %s",
+ ERROR("Failed opening proxy socket '%s' : %s",
buffer, fr_strerror());
home->last_failed_open = now;
listen_free(&this);
DEBUG("Trying SSL to port %d\n", home->port);
sock->ssn = tls_new_client_session(home->tls, this->fd);
if (!sock->ssn) {
- ERROR("Failed starting SSL to %s", buffer);
+ ERROR("Failed starting SSL to '%s'", buffer);
home->last_failed_open = now;
listen_free(&this);
return NULL;
memset(&src, 0, sizeof_src);
if (getsockname(this->fd, (struct sockaddr *) &src,
&sizeof_src) < 0) {
- ERROR("Failed getting socket name: %s",
- fr_syserror(errno));
+ ERROR("Failed getting socket name for '%s': %s",
+ buffer, fr_syserror(errno));
home->last_failed_open = now;
listen_free(&this);
return NULL;
if (!fr_sockaddr2ipaddr(&src, sizeof_src,
&sock->my_ipaddr, &sock->my_port)) {
- ERROR("Socket has unsupported address family");
+ ERROR("Socket has unsupported address family for '%s'", buffer);
home->last_failed_open = now;
listen_free(&this);
return NULL;