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,