X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=servers%2Fslapd%2Fconnection.c;h=62328798c81de38da6e597c4fe67be1624fb659c;hb=17f95a3fd30247a0735a3526d85b46178304748d;hp=8dbf0e63d7522d1ef93108993acec5a7e46e0b00;hpb=1b70e1644888c477890722e45307fea60eaa3d77;p=openldap diff --git a/servers/slapd/connection.c b/servers/slapd/connection.c index 8dbf0e63d7..62328798c8 100644 --- a/servers/slapd/connection.c +++ b/servers/slapd/connection.c @@ -1,6 +1,6 @@ /* $OpenLDAP$ */ /* - * Copyright 1998-2002 The OpenLDAP Foundation, All Rights Reserved. + * Copyright 1998-2003 The OpenLDAP Foundation, All Rights Reserved. * COPYING RESTRICTIONS APPLY, see COPYRIGHT file */ @@ -1228,16 +1228,20 @@ int connection_read(ber_socket_t s) #endif #define CONNECTION_INPUT_LOOP 1 +/* #define DATA_READY_LOOP 1 */ -#ifdef DATA_READY_LOOP - while( !rc && ber_sockbuf_ctrl( c->c_sb, LBER_SB_DATA_READY, NULL ) ) -#elif CONNECTION_INPUT_LOOP - while(!rc) -#endif + do { /* How do we do this without getting into a busy loop ? */ rc = connection_input( c ); } +#ifdef DATA_READY_LOOP + while( !rc && ber_sockbuf_ctrl( c->c_sb, LBER_SB_OPT_DATA_READY, NULL ) ); +#elif CONNECTION_INPUT_LOOP + while(!rc); +#else + while(0); +#endif if( rc < 0 ) { #ifdef NEW_LOGGING