]> git.sur5r.net Git - openldap/commitdiff
ITS#3983 fix connection_client_stop, must reset sockbuf
authorHoward Chu <hyc@openldap.org>
Mon, 29 Aug 2005 23:05:32 +0000 (23:05 +0000)
committerHoward Chu <hyc@openldap.org>
Mon, 29 Aug 2005 23:05:32 +0000 (23:05 +0000)
servers/slapd/connection.c

index 217ba8da08812a91fb7035201cb69957c8e85522..2f04844bec0034d28d666654ba74cc11d80199dc 100644 (file)
@@ -1158,6 +1158,13 @@ void connection_client_stop(
        c->c_conn_state = SLAP_C_INVALID;
        c->c_struct_state = SLAP_C_UNUSED;
        c->c_close_reason = "?";                        /* should never be needed */
+       ber_sockbuf_free( c->c_sb );
+       c->c_sb = ber_sockbuf_alloc( );
+       {
+               ber_len_t max = sockbuf_max_incoming;
+               ber_sockbuf_ctrl( c->c_sb, LBER_SB_OPT_SET_MAX_INCOMING, &max );
+       }
+
        connection_return( c );
        slapd_remove( s, 0, 1 );
 }