- bval.bv_val = value;
- bval.bv_len = vlen;
- if ( attr_merge_fast( e, type, vals, nvals, 1, &maxvals, &a )
- != 0 ) {
+#ifdef SLAPD_SCHEMA_NOT_COMPAT
+ ad = NULL;
+ rc = slap_str2ad( type, &ad, &text );
+
+ if( rc != LDAP_SUCCESS ) {
+ Debug( LDAP_DEBUG_TRACE,
+ "<= str2entry NULL (str2ad=%s)\n", text, 0, 0 );
+ entry_free( e );
+ free( value.bv_val );
+ free( type );
+ return( NULL );
+ }
+
+ rc = attr_merge( e, ad, vals );
+
+ ad_free( ad, 1 );
+#else
+ rc = attr_merge_fast( e, type, vals, nvals, 1, &maxvals, &a );
+#endif
+
+ if( rc != 0 ) {