+ } else if ( nr == -1 ) {
+#ifdef NEW_LOGGING
+ LDAP_LOG(( "config", LDAP_LEVEL_INFO,
+ "%s: line %d: unable to add"
+ " replica \"%s\"\n",
+ fname, lineno,
+ cargv[i] + 5 ));
+#else
+ Debug( LDAP_DEBUG_ANY,
+ "%s: line %d: unable to add replica \"%s\"\n",
+ fname, lineno, cargv[i] + 5 );
+#endif
+ return 1;
+ } else {
+ for ( i = 1; i < cargc; i++ ) {
+ if ( strncasecmp( cargv[i], "suffix=", 7 ) == 0 ) {
+
+ switch ( add_replica_suffix( be, nr, cargv[i] + 7 ) ) {
+ case 1:
+#ifdef NEW_LOGGING
+ LDAP_LOG(( "config", LDAP_LEVEL_INFO,
+ "%s: line %d: suffix \"%s\" in \"replica\" line is not valid for backend (ignored)\n",
+ fname, lineno, cargv[i] + 7 ));
+#else
+ Debug( LDAP_DEBUG_ANY,
+ "%s: line %d: suffix \"%s\" in \"replica\" line is not valid for backend (ignored)\n",
+ fname, lineno, cargv[i] + 7 );
+#endif
+ break;
+
+ case 2:
+#ifdef NEW_LOGGING
+ LDAP_LOG(( "config", LDAP_LEVEL_INFO,
+ "%s: line %d: unable to normalize suffix in \"replica\" line (ignored)\n",
+ fname, lineno ));
+#else
+ Debug( LDAP_DEBUG_ANY,
+ "%s: line %d: unable to normalize suffix in \"replica\" line (ignored)\n",
+ fname, lineno, 0 );
+#endif
+ break;
+ }
+
+ } else if ( strncasecmp( cargv[i], "attr", 4 ) == 0 ) {
+ int exclude = 0;
+ char *arg = cargv[i] + 4;
+
+ if ( arg[0] == '!' ) {
+ arg++;
+ exclude = 1;
+ }
+
+ if ( arg[0] != '=' ) {
+ continue;
+ }
+
+ if ( add_replica_attrs( be, nr, arg + 1, exclude ) ) {
+#ifdef NEW_LOGGING
+ LDAP_LOG(( "config", LDAP_LEVEL_INFO,
+ "%s: line %d: attribute \"%s\" in \"replica\" line is unknown\n",
+ fname, lineno, arg + 1 ));
+#else
+ Debug( LDAP_DEBUG_ANY,
+ "%s: line %d: attribute \"%s\" in \"replica\" line is unknown\n",
+ fname, lineno, arg + 1 );
+#endif
+ return( 1 );
+ }
+ }
+ }