From b5ac07244923be884255dfa8acc9c8a3da7d6ac1 Mon Sep 17 00:00:00 2001 From: Simo Sorce Date: Tue, 10 Nov 2009 16:39:17 -0500 Subject: Try to fix offline logins --- server/providers/ldap/ldap_id.c | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) (limited to 'server/providers/ldap/ldap_id.c') diff --git a/server/providers/ldap/ldap_id.c b/server/providers/ldap/ldap_id.c index 124ee7d..52391c2 100644 --- a/server/providers/ldap/ldap_id.c +++ b/server/providers/ldap/ldap_id.c @@ -709,10 +709,8 @@ static void sdap_account_info_users_done(struct tevent_req *req) dp_err = DP_ERR_FATAL; error = "Enum Users Failed"; - if (ret == ETIMEDOUT) { - dp_err = DP_ERR_TIMEOUT; - } - if (ret == ETIMEDOUT || ret == EFAULT) { + if (ret == ETIMEDOUT || ret == EFAULT || ret == EIO) { + dp_err = DP_ERR_OFFLINE; ctx = talloc_get_type(breq->be_ctx->bet_info[BET_ID].pvt_bet_data, struct sdap_id_ctx); sdap_mark_offline(ctx); @@ -737,10 +735,8 @@ static void sdap_account_info_groups_done(struct tevent_req *req) dp_err = DP_ERR_FATAL; error = "Enum Groups Failed"; - if (ret == ETIMEDOUT) { - dp_err = DP_ERR_TIMEOUT; - } - if (ret == ETIMEDOUT || ret == EFAULT) { + if (ret == ETIMEDOUT || ret == EFAULT || ret == EIO) { + dp_err = DP_ERR_OFFLINE; ctx = talloc_get_type(breq->be_ctx->bet_info[BET_ID].pvt_bet_data, struct sdap_id_ctx); sdap_mark_offline(ctx); @@ -765,10 +761,8 @@ static void sdap_account_info_initgr_done(struct tevent_req *req) dp_err = DP_ERR_FATAL; error = "Init Groups Failed"; - if (ret == ETIMEDOUT) { - dp_err = DP_ERR_TIMEOUT; - } - if (ret == ETIMEDOUT || ret == EFAULT) { + if (ret == ETIMEDOUT || ret == EFAULT || ret == EIO) { + dp_err = DP_ERR_OFFLINE; ctx = talloc_get_type(breq->be_ctx->bet_info[BET_ID].pvt_bet_data, struct sdap_id_ctx); sdap_mark_offline(ctx); -- cgit