From: Kurt Zeilenga Date: Fri, 14 Feb 2003 23:32:30 +0000 (+0000) Subject: Only install readahead layer when connectionless as X-Git-Tag: NO_SLAP_OP_BLOCKS~357 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=8ca394496bc547757219c0cc951bac1a12cc7cd9;p=openldap Only install readahead layer when connectionless as streams as streams may block. --- diff --git a/libraries/libldap/open.c b/libraries/libldap/open.c index 29ee135349..944e1f4970 100644 --- a/libraries/libldap/open.c +++ b/libraries/libldap/open.c @@ -286,8 +286,8 @@ ldap_int_open_connection( sasl_host = ldap_host_connected_to( conn->lconn_sb ); #endif break; -#ifdef LDAP_CONNECTIONLESS +#ifdef LDAP_CONNECTIONLESS case LDAP_PROTO_UDP: port = srv->lud_port; @@ -312,6 +312,10 @@ ldap_int_open_connection( #endif ber_sockbuf_add_io( conn->lconn_sb, &ber_sockbuf_io_udp, LBER_SBIOD_LEVEL_PROVIDER, NULL ); + + ber_sockbuf_add_io( conn->lconn_sb, &ber_sockbuf_io_readahead, + LBER_SBIOD_LEVEL_PROVIDER, NULL ); + break; #endif case LDAP_PROTO_IPC: @@ -337,9 +341,6 @@ ldap_int_open_connection( break; } - ber_sockbuf_add_io( conn->lconn_sb, &ber_sockbuf_io_readahead, - LBER_SBIOD_LEVEL_PROVIDER, NULL ); - #ifdef LDAP_DEBUG ber_sockbuf_add_io( conn->lconn_sb, &ber_sockbuf_io_debug, INT_MAX, (void *)"ldap_" );