Commit a0d8a981 authored by Pierangelo Masarati's avatar Pierangelo Masarati
Browse files

address ITS#3831 (mostly code readability)

parent dfff2e0b
......@@ -2240,21 +2240,22 @@ syncinfo_free( syncinfo_t *sie )
/* NOTE: used & documented in slapd.conf(5) */
#define IDSTR "rid"
#define PROVIDERSTR "provider"
#define TYPESTR "type"
#define INTERVALSTR "interval"
#define SEARCHBASESTR "searchbase"
#define SCHEMASTR "schemachecking"
#define FILTERSTR "filter"
#define SEARCHBASESTR "searchbase"
#define SCOPESTR "scope"
#define ATTRSSTR "attrs"
#define ATTRSONLYSTR "attrsonly"
#define ATTRSSTR "attrs"
#define TYPESTR "type"
#define INTERVALSTR "interval"
#define RETRYSTR "retry"
#define SLIMITSTR "sizelimit"
#define TLIMITSTR "timelimit"
#define SCHEMASTR "schemachecking"
/* FIXME: undocumented */
#define OLDAUTHCSTR "bindprincipal"
#define EXATTRSSTR "exattrs"
#define RETRYSTR "retry"
#define MANAGEDSAITSTR "manageDSAit"
/* FIXME: unused */
#define LASTMODSTR "lastmod"
......@@ -2263,7 +2264,6 @@ syncinfo_free( syncinfo_t *sie )
#define LMREQSTR "req"
#define SRVTABSTR "srvtab"
#define SUFFIXSTR "suffix"
#define MANAGEDSAITSTR "manageDSAit"
/* mandatory */
#define GOT_ID 0x0001
......@@ -2278,11 +2278,13 @@ static struct {
} scopes[] = {
{ BER_BVC("base"), LDAP_SCOPE_BASE },
{ BER_BVC("one"), LDAP_SCOPE_ONELEVEL },
{ BER_BVC("onelevel"), LDAP_SCOPE_ONELEVEL }, /* OpenLDAP extension */
#ifdef LDAP_SCOPE_SUBORDINATE
{ BER_BVC("children"), LDAP_SCOPE_SUBORDINATE },
{ BER_BVC("subordinate"), 0 },
{ BER_BVC("subordinate"), LDAP_SCOPE_SUBORDINATE },
#endif
{ BER_BVC("sub"), LDAP_SCOPE_SUBTREE },
{ BER_BVC("subtree"), LDAP_SCOPE_SUBTREE }, /* OpenLDAP extension */
{ BER_BVNULL, 0 }
};
......@@ -2357,9 +2359,7 @@ parse_syncrepl_line(
int j;
val = cargv[ i ] + STRLENOF( SCOPESTR "=" );
for ( j=0; !BER_BVISNULL(&scopes[j].key); j++ ) {
if (!strncasecmp( val, scopes[j].key.bv_val,
scopes[j].key.bv_len )) {
while (!scopes[j].val) j--;
if (!strcasecmp( val, scopes[j].key.bv_val )) {
si->si_scope = scopes[j].val;
break;
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment