]> git.sur5r.net Git - openldap/commitdiff
readahead is only needed on UDP, don't use it on TCP. (Save unneeded memcpy)
authorHoward Chu <hyc@openldap.org>
Thu, 10 Jan 2002 22:00:17 +0000 (22:00 +0000)
committerHoward Chu <hyc@openldap.org>
Thu, 10 Jan 2002 22:00:17 +0000 (22:00 +0000)
servers/slapd/connection.c

index a8b897d6226996936ca684a6cb5751beff37a19c..766ca439bf0ce53f5c10611bfe00a655a4ff1c87 100644 (file)
@@ -505,6 +505,8 @@ long connection_init(
 #endif
        ber_sockbuf_add_io( c->c_sb, &ber_sockbuf_io_udp,
                LBER_SBIOD_LEVEL_PROVIDER, (void *)&s );
+       ber_sockbuf_add_io( c->c_sb, &ber_sockbuf_io_readahead,
+               LBER_SBIOD_LEVEL_PROVIDER, NULL );
        } else
 #endif
        {
@@ -515,8 +517,6 @@ long connection_init(
        ber_sockbuf_add_io( c->c_sb, &ber_sockbuf_io_tcp,
                LBER_SBIOD_LEVEL_PROVIDER, (void *)&s );
        }
-       ber_sockbuf_add_io( c->c_sb, &ber_sockbuf_io_readahead,
-               LBER_SBIOD_LEVEL_PROVIDER, NULL );
 
 #ifdef LDAP_DEBUG
        ber_sockbuf_add_io( c->c_sb, &ber_sockbuf_io_debug,