assert read/write to not in use sockbufs. This may cause problems

with slapd... slapd should be fixed.
This commit is contained in:
Kurt Zeilenga 1999-06-15 02:31:15 +00:00
parent 61eaffeed2
commit e8a45b52b3

View File

@ -375,10 +375,9 @@ ber_pvt_sb_read( Sockbuf *sb, void *buf_arg, long len )
assert( sb != NULL ); assert( sb != NULL );
assert( SOCKBUF_VALID( sb ) ); assert( SOCKBUF_VALID( sb ) );
assert( status_is_ok(sb) ); assert( status_is_ok(sb) );
#if 0
/* breaks slapd :-< */ /* slapd might have problems with this */
assert( ber_pvt_sb_in_use( sb ) ); assert( ber_pvt_sb_in_use( sb ) );
#endif
#ifdef TEST_PARTIAL_READ #ifdef TEST_PARTIAL_READ
if ((rand() & 3)==1) { /* 1 out of 4 */ 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( sb != NULL );
assert( SOCKBUF_VALID( sb ) ); assert( SOCKBUF_VALID( sb ) );
assert( status_is_ok(sb) ); assert( status_is_ok(sb) );
#if 0
/* unfortunately breaks slapd */ /* slapd might have problems with this */
assert( ber_pvt_sb_in_use( sb ) ); assert( ber_pvt_sb_in_use( sb ) );
#endif
#ifdef TEST_PARTIAL_WRITE #ifdef TEST_PARTIAL_WRITE
if ((rand() & 3)==1) { /* 1 out of 4 */ if ((rand() & 3)==1) { /* 1 out of 4 */
errno = EWOULDBLOCK; errno = EWOULDBLOCK;