summaryrefslogtreecommitdiff
path: root/src/providers/ldap/sdap_async_connection.c
diff options
context:
space:
mode:
authoreindenbom <eindenbom@gmail.com>2010-07-09 15:54:05 +0400
committerStephen Gallagher <sgallagh@redhat.com>2010-07-09 11:44:06 -0400
commit2d7a7b0140a4d3fcef9148900276e24f82e33866 (patch)
tree522f68126ef654354497c84a68d788096bb8437f /src/providers/ldap/sdap_async_connection.c
parentfaace4bdd6b84f60d2f707c00d31a84c0e84d375 (diff)
downloadsssd-2d7a7b0140a4d3fcef9148900276e24f82e33866.tar.gz
sssd-2d7a7b0140a4d3fcef9148900276e24f82e33866.tar.bz2
sssd-2d7a7b0140a4d3fcef9148900276e24f82e33866.zip
LDAP connection usage tracking, sharing and failover retry framework.
Diffstat (limited to 'src/providers/ldap/sdap_async_connection.c')
-rw-r--r--src/providers/ldap/sdap_async_connection.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/providers/ldap/sdap_async_connection.c b/src/providers/ldap/sdap_async_connection.c
index 193971c2..2af6aaea 100644
--- a/src/providers/ldap/sdap_async_connection.c
+++ b/src/providers/ldap/sdap_async_connection.c
@@ -1213,15 +1213,31 @@ int sdap_cli_connect_recv(struct tevent_req *req,
struct sdap_handle **gsh,
struct sysdb_attrs **rootdse)
{
+ return sdap_cli_connect_recv_ext(req, memctx, NULL, gsh, rootdse);
+}
+
+int sdap_cli_connect_recv_ext(struct tevent_req *req,
+ TALLOC_CTX *memctx,
+ bool *can_retry,
+ struct sdap_handle **gsh,
+ struct sysdb_attrs **rootdse)
+{
struct sdap_cli_connect_state *state = tevent_req_data(req,
struct sdap_cli_connect_state);
enum tevent_req_state tstate;
uint64_t err;
+ if (can_retry) {
+ *can_retry = true;
+ }
if (tevent_req_is_error(req, &tstate, &err)) {
/* mark the server as bad if connection failed */
if (state->srv) {
fo_set_port_status(state->srv, PORT_NOT_WORKING);
+ } else {
+ if (can_retry) {
+ *can_retry = false;
+ }
}
if (tstate == TEVENT_REQ_USER_ERROR) {