From e8a45b52b31621c9ca5e0dd5ad9ce6e2458321b4 Mon Sep 17 00:00:00 2001 From: Kurt Zeilenga Date: Tue, 15 Jun 1999 02:31:15 +0000 Subject: [PATCH] assert read/write to not in use sockbufs. This may cause problems with slapd... slapd should be fixed. --- libraries/liblber/sockbuf.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/libraries/liblber/sockbuf.c b/libraries/liblber/sockbuf.c index ef00b9f9af..78251b361a 100644 --- a/libraries/liblber/sockbuf.c +++ b/libraries/liblber/sockbuf.c @@ -373,12 +373,11 @@ ber_pvt_sb_read( Sockbuf *sb, void *buf_arg, long len ) assert( buf_arg != NULL ); assert( sb != NULL ); - assert( SOCKBUF_VALID( sb ) ); + assert( SOCKBUF_VALID( sb ) ); assert( status_is_ok(sb) ); -#if 0 - /* breaks slapd :-< */ + + /* slapd might have problems with this */ assert( ber_pvt_sb_in_use( sb ) ); -#endif #ifdef TEST_PARTIAL_READ if ((rand() & 3)==1) { /* 1 out of 4 */ @@ -566,10 +565,10 @@ long ber_pvt_sb_write( Sockbuf *sb, void *buf, long len_arg ) assert( sb != NULL ); assert( SOCKBUF_VALID( sb ) ); assert( status_is_ok(sb) ); -#if 0 - /* unfortunately breaks slapd */ + + /* slapd might have problems with this */ assert( ber_pvt_sb_in_use( sb ) ); -#endif + #ifdef TEST_PARTIAL_WRITE if ((rand() & 3)==1) { /* 1 out of 4 */ errno = EWOULDBLOCK; -- 2.39.5