Allow sml_desc to be set by caller in slap_mods_check()

This commit is contained in:
Luke Howard 2005-07-23 12:00:52 +00:00
parent efa1ba86bf
commit 9a1c8cdb88

View File

@ -541,13 +541,14 @@ int slap_mods_check(
AttributeDescription *ad = NULL;
/* convert to attribute description */
rc = slap_bv2ad( &ml->sml_type, &ml->sml_desc, text );
if( rc != LDAP_SUCCESS ) {
snprintf( textbuf, textlen, "%s: %s",
ml->sml_type.bv_val, *text );
*text = textbuf;
return rc;
if ( ml->sml_desc == NULL ) {
rc = slap_bv2ad( &ml->sml_type, &ml->sml_desc, text );
if( rc != LDAP_SUCCESS ) {
snprintf( textbuf, textlen, "%s: %s",
ml->sml_type.bv_val, *text );
*text = textbuf;
return rc;
}
}
ad = ml->sml_desc;