From f0cd9956edfe7192448ef22ca40ac8e7942213ba Mon Sep 17 00:00:00 2001 From: Howard Chu Date: Thu, 10 Jan 2002 22:00:17 +0000 Subject: [PATCH] readahead is only needed on UDP, don't use it on TCP. (Save unneeded memcpy) --- servers/slapd/connection.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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, -- 2.39.5