From 2d471132db458107f157da12e7add7a0f7d56b93 Mon Sep 17 00:00:00 2001 From: Eric Covener Date: Sat, 12 Mar 2011 12:03:59 +0000 Subject: [PATCH] whitespace-only: re-indent the blocks I wrapped in an if with r1080922 git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1080923 13f79535-47bb-0310-9956-ffa450edef68 --- modules/ldap/util_ldap.c | 94 ++++++++++++++++++++-------------------- 1 file changed, 47 insertions(+), 47 deletions(-) diff --git a/modules/ldap/util_ldap.c b/modules/ldap/util_ldap.c index 11646ff7d0..a105881704 100644 --- a/modules/ldap/util_ldap.c +++ b/modules/ldap/util_ldap.c @@ -337,17 +337,17 @@ static int uldap_connection_init(request_rec *r, return(result->rc); } - if (ldc->ChaseReferrals == AP_LDAP_CHASEREFERRALS_ON) { - /* Now that we have an ldap struct, add it to the referral list for rebinds. */ - rc = apr_ldap_rebind_add(ldc->pool, ldc->ldap, ldc->binddn, ldc->bindpw); - if (rc != APR_SUCCESS) { - ap_log_error(APLOG_MARK, APLOG_ERR, rc, r->server, - "LDAP: Unable to add rebind cross reference entry. Out of memory?"); - uldap_connection_unbind(ldc); - ldc->reason = "LDAP: Unable to add rebind cross reference entry."; - return(rc); + if (ldc->ChaseReferrals == AP_LDAP_CHASEREFERRALS_ON) { + /* Now that we have an ldap struct, add it to the referral list for rebinds. */ + rc = apr_ldap_rebind_add(ldc->pool, ldc->ldap, ldc->binddn, ldc->bindpw); + if (rc != APR_SUCCESS) { + ap_log_error(APLOG_MARK, APLOG_ERR, rc, r->server, + "LDAP: Unable to add rebind cross reference entry. Out of memory?"); + uldap_connection_unbind(ldc); + ldc->reason = "LDAP: Unable to add rebind cross reference entry."; + return(rc); + } } - } /* always default to LDAP V3 */ ldap_set_option(ldc->ldap, LDAP_OPT_PROTOCOL_VERSION, &version); @@ -378,48 +378,48 @@ static int uldap_connection_init(request_rec *r, ldap_option = ldc->deref; ldap_set_option(ldc->ldap, LDAP_OPT_DEREF, &ldap_option); - if (ldc->ChaseReferrals == AP_LDAP_CHASEREFERRALS_ON) { - /* Set options for rebind and referrals. */ - ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, r->server, - "LDAP: Setting referrals to %s.", - ((ldc->ChaseReferrals == AP_LDAP_CHASEREFERRALS_ON) ? "On" : "Off")); - apr_ldap_set_option(r->pool, ldc->ldap, - APR_LDAP_OPT_REFERRALS, - (void *)((ldc->ChaseReferrals == AP_LDAP_CHASEREFERRALS_ON) ? - LDAP_OPT_ON : LDAP_OPT_OFF), - &(result)); - if (result->rc != LDAP_SUCCESS) { - ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, r->server, - "Unable to set LDAP_OPT_REFERRALS option to %s: %d.", - ((ldc->ChaseReferrals == AP_LDAP_CHASEREFERRALS_ON) ? "On" : "Off"), - result->rc); - result->reason = "Unable to set LDAP_OPT_REFERRALS."; - ldc->reason = result->reason; - uldap_connection_unbind(ldc); - return(result->rc); - } - - if ((ldc->ReferralHopLimit != AP_LDAP_HOPLIMIT_UNSET) && ldc->ChaseReferrals == AP_LDAP_CHASEREFERRALS_ON) { - /* Referral hop limit - only if referrals are enabled and a hop limit is explicitly requested */ + if (ldc->ChaseReferrals == AP_LDAP_CHASEREFERRALS_ON) { + /* Set options for rebind and referrals. */ ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, r->server, - "Setting referral hop limit to %d.", - ldc->ReferralHopLimit); + "LDAP: Setting referrals to %s.", + ((ldc->ChaseReferrals == AP_LDAP_CHASEREFERRALS_ON) ? "On" : "Off")); apr_ldap_set_option(r->pool, ldc->ldap, - APR_LDAP_OPT_REFHOPLIMIT, - (void *)&ldc->ReferralHopLimit, - &(result)); + APR_LDAP_OPT_REFERRALS, + (void *)((ldc->ChaseReferrals == AP_LDAP_CHASEREFERRALS_ON) ? + LDAP_OPT_ON : LDAP_OPT_OFF), + &(result)); if (result->rc != LDAP_SUCCESS) { - ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, r->server, - "Unable to set LDAP_OPT_REFHOPLIMIT option to %d: %d.", - ldc->ReferralHopLimit, - result->rc); - result->reason = "Unable to set LDAP_OPT_REFHOPLIMIT."; - ldc->reason = result->reason; - uldap_connection_unbind(ldc); - return(result->rc); + ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, r->server, + "Unable to set LDAP_OPT_REFERRALS option to %s: %d.", + ((ldc->ChaseReferrals == AP_LDAP_CHASEREFERRALS_ON) ? "On" : "Off"), + result->rc); + result->reason = "Unable to set LDAP_OPT_REFERRALS."; + ldc->reason = result->reason; + uldap_connection_unbind(ldc); + return(result->rc); + } + + if ((ldc->ReferralHopLimit != AP_LDAP_HOPLIMIT_UNSET) && ldc->ChaseReferrals == AP_LDAP_CHASEREFERRALS_ON) { + /* Referral hop limit - only if referrals are enabled and a hop limit is explicitly requested */ + ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, r->server, + "Setting referral hop limit to %d.", + ldc->ReferralHopLimit); + apr_ldap_set_option(r->pool, ldc->ldap, + APR_LDAP_OPT_REFHOPLIMIT, + (void *)&ldc->ReferralHopLimit, + &(result)); + if (result->rc != LDAP_SUCCESS) { + ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, r->server, + "Unable to set LDAP_OPT_REFHOPLIMIT option to %d: %d.", + ldc->ReferralHopLimit, + result->rc); + result->reason = "Unable to set LDAP_OPT_REFHOPLIMIT."; + ldc->reason = result->reason; + uldap_connection_unbind(ldc); + return(result->rc); + } } } - } /*XXX All of the #ifdef's need to be removed once apr-util 1.2 is released */ #ifdef APR_LDAP_OPT_VERIFY_CERT -- 2.40.0