From: Luke Howard Date: Sat, 23 Jul 2005 12:00:52 +0000 (+0000) Subject: Allow sml_desc to be set by caller in slap_mods_check() X-Git-Tag: OPENLDAP_AC_BP~233 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=9a1c8cdb88f5e5abd08d5cc8ab91b0deccbcc1aa;p=openldap Allow sml_desc to be set by caller in slap_mods_check() --- diff --git a/servers/slapd/modify.c b/servers/slapd/modify.c index a0d7d225fd..e943b22db1 100644 --- a/servers/slapd/modify.c +++ b/servers/slapd/modify.c @@ -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;