]> git.ipfire.org Git - thirdparty/openldap.git/commitdiff
Be consistent with bind responses on no upstream
authorOndřej Kuzník <ondra@mistotebe.net>
Tue, 13 Jun 2017 18:36:23 +0000 (19:36 +0100)
committerOndřej Kuzník <okuznik@symas.com>
Tue, 17 Nov 2020 17:55:46 +0000 (17:55 +0000)
servers/lloadd/operation.c

index dda78da4c99476bfde963dbbf86f01467307bd9d..a067ebcf548263eb385ccbeb5ecb08e5d828b9ae 100644 (file)
@@ -649,6 +649,9 @@ request_process( Connection *client, Operation *op )
         Debug( LDAP_DEBUG_STATS, "request_process: "
                 "connid=%lu, msgid=%d no available connection found\n",
                 op->o_client_connid, op->o_client_msgid );
+
+        operation_send_reject(
+                op, LDAP_UNAVAILABLE, "no connections available", 1 );
         goto fail;
     }
     op->o_upstream = upstream;
@@ -723,8 +726,8 @@ fail:
         ldap_pvt_thread_mutex_unlock( &upstream->c_io_mutex );
         CONNECTION_LOCK_DECREF(upstream);
         UPSTREAM_UNLOCK_OR_DESTROY(upstream);
+        operation_send_reject( op, LDAP_OTHER, "internal error", 0 );
     }
-    operation_send_reject( op, LDAP_OTHER, "internal error", 0 );
     CONNECTION_LOCK_DECREF(client);
     op->o_client_refcnt--;
     operation_destroy_from_client( op );