}
} else {
- int rc = LDAP_SUCCESS;
+ int rc;
int match;
for ( i = 1; mods->sml_values[i].bv_val != NULL; i++ ) {
? &mods->sml_nvalues[j]
: &mods->sml_values[j],
text );
+
if ( rc == LDAP_SUCCESS && match == 0 ) {
/* value exists already */
snprintf( textbuf, textlen,
"%s: value #%d provided more than once",
mods->sml_desc->ad_cname.bv_val, j );
return LDAP_TYPE_OR_VALUE_EXISTS;
+
+ } else if ( rc != LDAP_SUCCESS ) {
+ return rc;
}
}
}
- if ( rc != LDAP_SUCCESS ) {
- return rc;
- }
}
}
}
} else {
- int rc = LDAP_SUCCESS;
+ int rc;
int match;
for ( i = 1; ml->sml_values[i].bv_val != NULL; i++ ) {
ml->sml_desc->ad_cname.bv_val, j );
*text = textbuf;
return LDAP_TYPE_OR_VALUE_EXISTS;
+
+ } else if ( rc != LDAP_SUCCESS ) {
+ return rc;
}
}
}
-
- if ( rc != LDAP_SUCCESS ) return rc;
}
}
"modify/%s: %s: value #%d already exists",
op, mod->sm_desc->ad_cname.bv_val, i );
return LDAP_TYPE_OR_VALUE_EXISTS;
+
+ } else if ( rc != LDAP_SUCCESS ) {
+ return rc;
}
}
}
/* desc form, return undefined */
- return SLAPD_COMPARE_UNDEFINED;
+ return LDAP_INVALID_SYNTAX;
}
if ( oc == NULL ) {
/* unrecognized stored value */
- return SLAPD_COMPARE_UNDEFINED;
+ return LDAP_INVALID_SYNTAX;
}
if( SLAP_MR_IS_VALUE_OF_ATTRIBUTE_SYNTAX( flags ) ) {