]> git.sur5r.net Git - openldap/commitdiff
Add trickle code to test ber_get_next.
authorKurt Zeilenga <kurt@openldap.org>
Thu, 22 May 2003 04:37:44 +0000 (04:37 +0000)
committerKurt Zeilenga <kurt@openldap.org>
Thu, 22 May 2003 04:37:44 +0000 (04:37 +0000)
Use etest {...} | dtest {...} to test.

libraries/liblber/io.c

index 4815bbcd1aa0390309041d0d23c70c452a069a7a..ecab5860ae3cffbbf558fc92e9c31fec3e5cec7a 100644 (file)
@@ -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;
                }