From: Kurt Zeilenga Date: Sun, 6 May 2001 20:01:18 +0000 (+0000) Subject: Fix disconnect bug X-Git-Tag: LDBM_PRE_GIANT_RWLOCK~1437 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=60c5e77cd64a4afb3a0cb3560818d911df9c519a;p=openldap Fix disconnect bug --- diff --git a/servers/slapd/controls.c b/servers/slapd/controls.c index a727dbf7aa..ec3712c31a 100644 --- a/servers/slapd/controls.c +++ b/servers/slapd/controls.c @@ -211,9 +211,10 @@ return_results: Debug( LDAP_DEBUG_TRACE, "<= get_ctrls: %d %d %s\n", nctrls, rc, errmsg ? errmsg : ""); #endif + if( sendres && rc != LDAP_SUCCESS ) { if( rc == SLAPD_DISCONNECT ) { - send_ldap_disconnect( conn, op, rc, errmsg ); + send_ldap_disconnect( conn, op, LDAP_PROTOCOL_ERROR, errmsg ); } else { send_ldap_result( conn, op, rc, NULL, errmsg, NULL, NULL );