mirror of
https://git.openldap.org/openldap/openldap.git
synced 2024-12-15 03:01:09 +08:00
assert read/write to not in use sockbufs. This may cause problems
with slapd... slapd should be fixed.
This commit is contained in:
parent
61eaffeed2
commit
e8a45b52b3
@ -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;
|
||||||
|
Loading…
Reference in New Issue
Block a user