From: Kurt Zeilenga Date: Thu, 22 May 2003 04:37:44 +0000 (+0000) Subject: Add trickle code to test ber_get_next. X-Git-Tag: OPENLDAP_REL_ENG_2_2_0ALPHA~89 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=6d36ba9d9f8c29e40388dc6d18fd42a47bdc3c19;p=openldap Add trickle code to test ber_get_next. Use etest {...} | dtest {...} to test. --- diff --git a/libraries/liblber/io.c b/libraries/liblber/io.c index 4815bbcd1a..ecab5860ae 100644 --- a/libraries/liblber/io.c +++ b/libraries/liblber/io.c @@ -227,7 +227,12 @@ ber_flush( Sockbuf *sb, BerElement *ber, int freeit ) } while ( towrite > 0 ) { +#ifdef LBER_TRICKLE + sleep(1); + rc = ber_int_sb_write( sb, ber->ber_rwptr, 1 ); +#else rc = ber_int_sb_write( sb, ber->ber_rwptr, towrite ); +#endif if (rc<=0) { return -1; }