From a073bc89c4717b3504571c6ec4dc1449ba7325a0 Mon Sep 17 00:00:00 2001 From: Florian Westphal Date: Thu, 17 May 2007 12:39:25 +0000 Subject: [PATCH] there is no need to treat servers differently than clients on the read side. --- src/ngircd/conn.c | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/src/ngircd/conn.c b/src/ngircd/conn.c index 05130973..912ac3af 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.207 2007/05/09 13:21:11 fw Exp $"; +static char UNUSED id[] = "$Id: conn.c,v 1.208 2007/05/17 12:39:25 fw Exp $"; #include "imp.h" #include @@ -1058,22 +1058,17 @@ Read_Request( CONN_ID Idx ) /* Daten von Socket einlesen und entsprechend behandeln. * Tritt ein Fehler auf, so wird der Socket geschlossen. */ - size_t readbuf_limit = READBUFFER_LEN; ssize_t len; char readbuf[READBUFFER_LEN]; CLIENT *c; assert( Idx > NONE ); assert( My_Connections[Idx].sock > NONE ); - c = Conn_GetClient(Idx); - assert ( c != NULL); - if (Client_Type(c) == CLIENT_SERVER) - readbuf_limit = READBUFFER_LEN * 10; #ifdef ZLIB - if ((array_bytes(&My_Connections[Idx].rbuf) >= readbuf_limit) || - (array_bytes(&My_Connections[Idx].zip.rbuf) >= readbuf_limit)) + if ((array_bytes(&My_Connections[Idx].rbuf) >= READBUFFER_LEN) || + (array_bytes(&My_Connections[Idx].zip.rbuf) >= READBUFFER_LEN)) #else - if (array_bytes(&My_Connections[Idx].rbuf) >= readbuf_limit) + if (array_bytes(&My_Connections[Idx].rbuf) >= READBUFFER_LEN) #endif { /* Der Lesepuffer ist voll */ -- 2.39.2