mirror of
https://git.openldap.org/openldap/openldap.git
synced 2024-12-21 03:10:25 +08:00
address ITS#3831 (mostly code readability)
This commit is contained in:
parent
dfff2e0b32
commit
a0d8a981ac
@ -2240,21 +2240,22 @@ syncinfo_free( syncinfo_t *sie )
|
|||||||
/* NOTE: used & documented in slapd.conf(5) */
|
/* NOTE: used & documented in slapd.conf(5) */
|
||||||
#define IDSTR "rid"
|
#define IDSTR "rid"
|
||||||
#define PROVIDERSTR "provider"
|
#define PROVIDERSTR "provider"
|
||||||
|
#define SCHEMASTR "schemachecking"
|
||||||
|
#define FILTERSTR "filter"
|
||||||
|
#define SEARCHBASESTR "searchbase"
|
||||||
|
#define SCOPESTR "scope"
|
||||||
|
#define ATTRSONLYSTR "attrsonly"
|
||||||
|
#define ATTRSSTR "attrs"
|
||||||
#define TYPESTR "type"
|
#define TYPESTR "type"
|
||||||
#define INTERVALSTR "interval"
|
#define INTERVALSTR "interval"
|
||||||
#define SEARCHBASESTR "searchbase"
|
#define RETRYSTR "retry"
|
||||||
#define FILTERSTR "filter"
|
|
||||||
#define SCOPESTR "scope"
|
|
||||||
#define ATTRSSTR "attrs"
|
|
||||||
#define ATTRSONLYSTR "attrsonly"
|
|
||||||
#define SLIMITSTR "sizelimit"
|
#define SLIMITSTR "sizelimit"
|
||||||
#define TLIMITSTR "timelimit"
|
#define TLIMITSTR "timelimit"
|
||||||
#define SCHEMASTR "schemachecking"
|
|
||||||
|
|
||||||
/* FIXME: undocumented */
|
/* FIXME: undocumented */
|
||||||
#define OLDAUTHCSTR "bindprincipal"
|
#define OLDAUTHCSTR "bindprincipal"
|
||||||
#define EXATTRSSTR "exattrs"
|
#define EXATTRSSTR "exattrs"
|
||||||
#define RETRYSTR "retry"
|
#define MANAGEDSAITSTR "manageDSAit"
|
||||||
|
|
||||||
/* FIXME: unused */
|
/* FIXME: unused */
|
||||||
#define LASTMODSTR "lastmod"
|
#define LASTMODSTR "lastmod"
|
||||||
@ -2263,7 +2264,6 @@ syncinfo_free( syncinfo_t *sie )
|
|||||||
#define LMREQSTR "req"
|
#define LMREQSTR "req"
|
||||||
#define SRVTABSTR "srvtab"
|
#define SRVTABSTR "srvtab"
|
||||||
#define SUFFIXSTR "suffix"
|
#define SUFFIXSTR "suffix"
|
||||||
#define MANAGEDSAITSTR "manageDSAit"
|
|
||||||
|
|
||||||
/* mandatory */
|
/* mandatory */
|
||||||
#define GOT_ID 0x0001
|
#define GOT_ID 0x0001
|
||||||
@ -2278,11 +2278,13 @@ static struct {
|
|||||||
} scopes[] = {
|
} scopes[] = {
|
||||||
{ BER_BVC("base"), LDAP_SCOPE_BASE },
|
{ BER_BVC("base"), LDAP_SCOPE_BASE },
|
||||||
{ BER_BVC("one"), LDAP_SCOPE_ONELEVEL },
|
{ BER_BVC("one"), LDAP_SCOPE_ONELEVEL },
|
||||||
|
{ BER_BVC("onelevel"), LDAP_SCOPE_ONELEVEL }, /* OpenLDAP extension */
|
||||||
#ifdef LDAP_SCOPE_SUBORDINATE
|
#ifdef LDAP_SCOPE_SUBORDINATE
|
||||||
{ BER_BVC("children"), LDAP_SCOPE_SUBORDINATE },
|
{ BER_BVC("children"), LDAP_SCOPE_SUBORDINATE },
|
||||||
{ BER_BVC("subordinate"), 0 },
|
{ BER_BVC("subordinate"), LDAP_SCOPE_SUBORDINATE },
|
||||||
#endif
|
#endif
|
||||||
{ BER_BVC("sub"), LDAP_SCOPE_SUBTREE },
|
{ BER_BVC("sub"), LDAP_SCOPE_SUBTREE },
|
||||||
|
{ BER_BVC("subtree"), LDAP_SCOPE_SUBTREE }, /* OpenLDAP extension */
|
||||||
{ BER_BVNULL, 0 }
|
{ BER_BVNULL, 0 }
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -2357,9 +2359,7 @@ parse_syncrepl_line(
|
|||||||
int j;
|
int j;
|
||||||
val = cargv[ i ] + STRLENOF( SCOPESTR "=" );
|
val = cargv[ i ] + STRLENOF( SCOPESTR "=" );
|
||||||
for ( j=0; !BER_BVISNULL(&scopes[j].key); j++ ) {
|
for ( j=0; !BER_BVISNULL(&scopes[j].key); j++ ) {
|
||||||
if (!strncasecmp( val, scopes[j].key.bv_val,
|
if (!strcasecmp( val, scopes[j].key.bv_val )) {
|
||||||
scopes[j].key.bv_len )) {
|
|
||||||
while (!scopes[j].val) j--;
|
|
||||||
si->si_scope = scopes[j].val;
|
si->si_scope = scopes[j].val;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user