From: Howard Chu Date: Thu, 10 Jan 2002 22:00:17 +0000 (+0000) Subject: readahead is only needed on UDP, don't use it on TCP. (Save unneeded memcpy) X-Git-Tag: LDBM_PRE_GIANT_RWLOCK~201 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=f0cd9956edfe7192448ef22ca40ac8e7942213ba;p=openldap readahead is only needed on UDP, don't use it on TCP. (Save unneeded memcpy) --- diff --git a/servers/slapd/connection.c b/servers/slapd/connection.c index a8b897d622..766ca439bf 100644 --- a/servers/slapd/connection.c +++ b/servers/slapd/connection.c @@ -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,