From: Quanah Gibson-Mount Date: Mon, 10 Nov 2008 18:23:53 +0000 (+0000) Subject: fix indentation X-Git-Tag: OPENLDAP_REL_ENG_2_4_13~111 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=134e7c1761e85285f1188e0da52d17f87cd6feab;p=openldap fix indentation --- diff --git a/servers/slapd/back-bdb/search.c b/servers/slapd/back-bdb/search.c index aa0b5f975b..f8f8cc36f7 100644 --- a/servers/slapd/back-bdb/search.c +++ b/servers/slapd/back-bdb/search.c @@ -695,56 +695,57 @@ loop_begin: * any subsequent entries */ nentries++; - if ( nentries > bdb->bi_cache.c_maxsize && !idflag ) + if ( nentries > bdb->bi_cache.c_maxsize && !idflag ) { idflag = ID_NOCACHE; + } fetch_entry_retry: - /* get the entry with reader lock */ - ei = NULL; - rs->sr_err = bdb_cache_find_id( op, ltid, - id, &ei, idflag, &lock ); - - if (rs->sr_err == LDAP_BUSY) { - rs->sr_text = "ldap server busy"; - send_ldap_result( op, rs ); - goto done; + /* get the entry with reader lock */ + ei = NULL; + rs->sr_err = bdb_cache_find_id( op, ltid, + id, &ei, idflag, &lock ); - } else if ( rs->sr_err == DB_LOCK_DEADLOCK ) { - if ( !opinfo ) { - ltid->flags &= ~TXN_DEADLOCK; - goto fetch_entry_retry; - } - opinfo->boi_err = rs->sr_err; - send_ldap_error( op, rs, LDAP_BUSY, "ldap server busy" ); - goto done; + if (rs->sr_err == LDAP_BUSY) { + rs->sr_text = "ldap server busy"; + send_ldap_result( op, rs ); + goto done; - } else if ( rs->sr_err == DB_LOCK_NOTGRANTED ) - { + } else if ( rs->sr_err == DB_LOCK_DEADLOCK ) { + if ( !opinfo ) { + ltid->flags &= ~TXN_DEADLOCK; goto fetch_entry_retry; - } else if ( rs->sr_err == LDAP_OTHER ) { - rs->sr_text = "internal error"; - send_ldap_result( op, rs ); - goto done; } + opinfo->boi_err = rs->sr_err; + send_ldap_error( op, rs, LDAP_BUSY, "ldap server busy" ); + goto done; - if ( ei && rs->sr_err == LDAP_SUCCESS ) { - e = ei->bei_e; - } else { - e = NULL; - } + } else if ( rs->sr_err == DB_LOCK_NOTGRANTED ) + { + goto fetch_entry_retry; + } else if ( rs->sr_err == LDAP_OTHER ) { + rs->sr_text = "internal error"; + send_ldap_result( op, rs ); + goto done; + } - if ( e == NULL ) { - if( !BDB_IDL_IS_RANGE(candidates) ) { - /* only complain for non-range IDLs */ - Debug( LDAP_DEBUG_TRACE, - LDAP_XSTRING(bdb_search) - ": candidate %ld not found\n", - (long) id, 0, 0 ); - } + if ( ei && rs->sr_err == LDAP_SUCCESS ) { + e = ei->bei_e; + } else { + e = NULL; + } - goto loop_continue; + if ( e == NULL ) { + if( !BDB_IDL_IS_RANGE(candidates) ) { + /* only complain for non-range IDLs */ + Debug( LDAP_DEBUG_TRACE, + LDAP_XSTRING(bdb_search) + ": candidate %ld not found\n", + (long) id, 0, 0 ); } + goto loop_continue; + } + rs->sr_entry = e; if ( is_entry_subentry( e ) ) {