]> arthur.barton.de Git - ngircd.git/commitdiff
there is no need to treat servers differently than clients on the read side.
authorFlorian Westphal <fw@strlen.de>
Thu, 17 May 2007 12:39:25 +0000 (12:39 +0000)
committerFlorian Westphal <fw@strlen.de>
Thu, 17 May 2007 12:39:25 +0000 (12:39 +0000)
src/ngircd/conn.c

index 051309739c9a8495cf5f3889430be98814adb09a..912ac3afe0fe26106cdf7411e1439fca67ad22e8 100644 (file)
@@ -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 <assert.h>
@@ -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 */