return(ARG_BAD_CONF);
}
if(Conf->max_args && (c->argc > Conf->max_args)) {
- sprintf( c->msg, "<%s> extra cruft after <%s> ignored",
+ char *ignored = " ignored";
+
+ sprintf( c->msg, "<%s> extra cruft after <%s>",
c->argv[0], Conf->what );
- Debug(LDAP_DEBUG_CONFIG, "%s: %s\n", c->log, c->msg, 0 );
+
+#ifdef LDAP_DEVEL
+ ignored = "";
+#endif /* LDAP_DEVEL */
+ Debug(LDAP_DEBUG_CONFIG, "%s: %s%s.\n",
+ c->log, c->msg, ignored );
+#ifdef LDAP_DEVEL
+ return(ARG_BAD_CONF);
+#endif /* LDAP_DEVEL */
}
if((arg_type & ARG_DB) && !c->be) {
sprintf( c->msg, "<%s> only allowed within database declaration",
int i;
if ( !m ) {
- return 1;
+ return LDAP_OPERATIONS_ERROR;
}
for ( i = 0; !BER_BVISNULL( &(*vp)[ i ].word ); i++ ) {
if ( ( m & (*vp)[ i ].mask ) == (*vp)[ i ].mask ) {
if ( ber_bvstrcasecmp( v, &(*vp)[ i ].word ) == 0 ) {
/* already set; ignore */
- return 0;
+ return LDAP_SUCCESS;
}
/* conflicts */
- return 1;
+ return LDAP_TYPE_OR_VALUE_EXISTS;
}
if ( m & (*vp)[ i ].mask ) {
/* conflicts */
- return 1;
+ return LDAP_CONSTRAINT_VIOLATION;
}
check_next:;
}
*((slap_mask_t *)&(*vp)[ i ].mask) = m;
BER_BVZERO( &(*vp)[ i + 1 ].word );
- return 0;
+ return LDAP_SUCCESS;
}
int