*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
- "Can't bind to [%s]:%u: can't convert ip address \"%s\"!",
- listen_addrstr, Port, listen_addrstr);
+ "Can't listen on [%s]:%u: Failed to parse IP address!",
+ listen_addrstr, Port);
* the calculation of in_p and out_p: in_z_k and out_z_k
* are non-zero, that's guaranteed by the protocol until
* compression can be enabled. */
* the calculation of in_p and out_p: in_z_k and out_z_k
* are non-zero, that's guaranteed by the protocol until
* compression can be enabled. */
if (!Conn_OPTION_ISSET(&My_Connections[Idx], CONN_ISCLOSING))
Log(LOG_ERR,
"Write error on connection %d (socket %d): %s!",
if (!Conn_OPTION_ISSET(&My_Connections[Idx], CONN_ISCLOSING))
Log(LOG_ERR,
"Write error on connection %d (socket %d): %s!",
else
LogDebug("Recursive write error on connection %d (socket %d): %s!",
Idx, My_Connections[Idx].sock, strerror(errno));
else
LogDebug("Recursive write error on connection %d (socket %d): %s!",
Idx, My_Connections[Idx].sock, strerror(errno));
if (len == 0) {
LogDebug("Client \"%s:%u\" is closing connection %d ...",
My_Connections[Idx].host,
if (len == 0) {
LogDebug("Client \"%s:%u\" is closing connection %d ...",
My_Connections[Idx].host,
Log(LOG_ERR, "Read error on connection %d (socket %d): %s!",
Idx, My_Connections[Idx].sock, strerror(errno));
Conn_Close(Idx, "Read error", "Client closed connection",
false);
return;
}
Log(LOG_ERR, "Read error on connection %d (socket %d): %s!",
Idx, My_Connections[Idx].sock, strerror(errno));
Conn_Close(Idx, "Read error", "Client closed connection",
false);
return;
}
+
+ /* Now append the newly received data to the connection buffer.
+ * NOTE: This can lead to connection read buffers being bigger(!) than
+ * READBUFFER_LEN bytes, as we add up to READBUFFER_LEN new bytes to a
+ * buffer possibly being "almost" READBUFFER_LEN bytes already! */
#ifdef ZLIB
if (Conn_OPTION_ISSET(&My_Connections[Idx], CONN_ZIP)) {
if (!array_catb(&My_Connections[Idx].zip.rbuf, readbuf,
#ifdef ZLIB
if (Conn_OPTION_ISSET(&My_Connections[Idx], CONN_ZIP)) {
if (!array_catb(&My_Connections[Idx].zip.rbuf, readbuf,
Conf_Server[i].lasttry = time_now;
Conf_Server[i].conn_id = SERVER_WAIT;
assert(Proc_GetPipeFd(&Conf_Server[i].res_stat) < 0);
Conf_Server[i].lasttry = time_now;
Conf_Server[i].conn_id = SERVER_WAIT;
assert(Proc_GetPipeFd(&Conf_Server[i].res_stat) < 0);
- Resolve_Name(&Conf_Server[i].res_stat, Conf_Server[i].host,
- cb_Connect_to_Server);
+
+ /* Start resolver subprocess ... */
+ if (!Resolve_Name(&Conf_Server[i].res_stat, Conf_Server[i].host,
+ cb_Connect_to_Server))
+ Conf_Server[i].conn_id = NONE;
* @param Reason The reason, see THROTTLE_xxx constants.
* @param Idx The connection index.
* @param Client The client of this connection.
* @param Reason The reason, see THROTTLE_xxx constants.
* @param Idx The connection index.
* @param Client The client of this connection.
*/
static void
Throttle_Connection(const CONN_ID Idx, CLIENT *Client, const int Reason,
*/
static void
Throttle_Connection(const CONN_ID Idx, CLIENT *Client, const int Reason,