about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorFlorian Westphal <fw@strlen.de>2005-08-28 00:19:29 +0000
committerFlorian Westphal <fw@strlen.de>2005-08-28 00:19:29 +0000
commit2f105b1c0a9d8975e9b0fc9fce47c56a70a083fb (patch)
tree316857a474c138ea282b1525191b9b6696e54490 /src
parenta2cdc08c396d6ba3906ffb9478ce2ac52257ae93 (diff)
downloadngircd-2f105b1c0a9d8975e9b0fc9fce47c56a70a083fb.tar.gz
ngircd-2f105b1c0a9d8975e9b0fc9fce47c56a70a083fb.zip
if the request is empty, remove \r\n (or single \n or \r) from receive buffer.
Diffstat (limited to 'src')
-rw-r--r--src/ngircd/conn.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/ngircd/conn.c b/src/ngircd/conn.c
index 8f343ea4..802bdc4c 100644
--- a/src/ngircd/conn.c
+++ b/src/ngircd/conn.c
@@ -17,7 +17,7 @@
 #include "portab.h"
 #include "io.h"
 
-static char UNUSED id[] = "$Id: conn.c,v 1.172 2005/08/27 23:42:23 fw Exp $";
+static char UNUSED id[] = "$Id: conn.c,v 1.173 2005/08/28 00:19:29 fw Exp $";
 
 #include "imp.h"
 #include <assert.h>
@@ -1214,8 +1214,8 @@ Handle_Buffer( CONN_ID Idx )
 			return false;
 		}
 
-		if (len < 3) { /* request was empty (only '\r\n') */
-			array_trunc(&My_Connections[Idx].rbuf);
+		if (len <= 2) { /* request was empty (only '\r\n') */
+			array_moveleft(&My_Connections[Idx].rbuf, 1, delta); /* delta is either 1 or 2 */
 			break;
 		}
 #ifdef ZLIB