]> git.sur5r.net Git - openldap/commitdiff
assert read/write to not in use sockbufs. This may cause problems
authorKurt Zeilenga <kurt@openldap.org>
Tue, 15 Jun 1999 02:31:15 +0000 (02:31 +0000)
committerKurt Zeilenga <kurt@openldap.org>
Tue, 15 Jun 1999 02:31:15 +0000 (02:31 +0000)
with slapd... slapd should be fixed.

libraries/liblber/sockbuf.c

index ef00b9f9afe1ab85ebfa44d3d10129b0eb1942ff..78251b361a47f9e758089b96c1a3ea979550f7cf 100644 (file)
@@ -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;