]> git.sur5r.net Git - openldap/commitdiff
Allow sml_desc to be set by caller in slap_mods_check()
authorLuke Howard <lukeh@openldap.org>
Sat, 23 Jul 2005 12:00:52 +0000 (12:00 +0000)
committerLuke Howard <lukeh@openldap.org>
Sat, 23 Jul 2005 12:00:52 +0000 (12:00 +0000)
servers/slapd/modify.c

index a0d7d225fde6cfae4af23af74234dc2a5aa9bd48..e943b22db10217fe9f348b01be8d0a870ec8211e 100644 (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;