* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
* Please read the file COPYING, README and AUTHORS for more information.
- *
- * Connection compression using ZLIB
*/
#include "portab.h"
+/**
+ * @file
+ * Connection compression using ZLIB
+ */
+
#define CONN_MODULE
#ifdef ZLIB
/* enable more zlib related debug messages: */
/* #define DEBUG_ZLIB */
-#include "imp.h"
#include <assert.h>
#include <string.h>
#include <zlib.h>
#include "conn.h"
#include "conn-func.h"
#include "log.h"
-
#include "array.h"
-#include "exp.h"
+
#include "conn-zip.h"
* otherwise the zip wbuf would grow too large */
buflen = array_bytes(&My_Connections[Idx].zip.wbuf);
if (buflen + Len >= WRITEBUFFER_SLINK_LEN) {
- Log(LOG_ALERT, "Zip Write Buffer overflow: %lu bytes\n", buflen + Len);
- Conn_Close(Idx, "Zip Write buffer overflow", NULL, false);
+ Log(LOG_ALERT, "Zip Write buffer space exhausted: %lu bytes", buflen + Len);
+ Conn_Close(Idx, "Zip Write buffer space exhausted", NULL, false);
return false;
}
return array_catb(&My_Connections[Idx].zip.wbuf, Data, Len);
if (out->avail_out <= 0) {
/* Not all data was compressed, because data became
* bigger while compressing it. */
- Log (LOG_ALERT, "Compression error: buffer overvlow!?");
+ Log(LOG_ALERT, "Compression error: buffer overflow!?");
Conn_Close(Idx, "Compression error!", NULL, false);
return false;
}