]> git.sur5r.net Git - openldap/commitdiff
Fix disconnect bug
authorKurt Zeilenga <kurt@openldap.org>
Sun, 6 May 2001 20:01:18 +0000 (20:01 +0000)
committerKurt Zeilenga <kurt@openldap.org>
Sun, 6 May 2001 20:01:18 +0000 (20:01 +0000)
servers/slapd/controls.c

index a727dbf7aa81c72a724485cb87d4b4f34d386300..ec3712c31abbcedce439ce9f981317114bb4014b 100644 (file)
@@ -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 );