From: Pierangelo Masarati Date: Mon, 4 Jul 2005 16:34:42 +0000 (+0000) Subject: address ITS#3831 (mostly code readability) X-Git-Tag: OPENLDAP_AC_BP~453 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=a0d8a981ac3cf7a8b1fa49937897f0306929b975;p=openldap address ITS#3831 (mostly code readability) --- diff --git a/servers/slapd/syncrepl.c b/servers/slapd/syncrepl.c index d84743c5c2..aab5c5fbd8 100644 --- a/servers/slapd/syncrepl.c +++ b/servers/slapd/syncrepl.c @@ -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; }