]> git.sur5r.net Git - openldap/blobdiff - servers/slapd/back-ldbm/operational.c
Added dnPretty2/dnNormalize2 using preallocated destination berval
[openldap] / servers / slapd / back-ldbm / operational.c
index 81fe0efb1edbda15c953eb45a54091227bc7e2c7..6ee99cb312631a9d44e74572ea96bc0abb7a1af1 100644 (file)
@@ -25,7 +25,7 @@ ldbm_back_operational(
        Connection      *conn, 
        Operation       *op,
        Entry           *e,
-       char            **attrs,
+       struct berval           **attrs,
        int             opattrs,
        Attribute       **a )
 {
@@ -37,16 +37,10 @@ ldbm_back_operational(
                int     hs;
 
                hs = has_children( be, e );
-
-               *aa = ch_malloc( sizeof( Attribute ) );
-               (*aa)->a_desc = slap_schema.si_ad_hasSubordinates;
-
-               (*aa)->a_vals = ch_malloc( 2 * sizeof( struct berval * ) );
-               (*aa)->a_vals[0] = ber_bvstrdup( hs ? "TRUE" : "FALSE" );
-               (*aa)->a_vals[1] = NULL;
-
-               (*aa)->a_next = NULL;
-               aa = &(*aa)->a_next;
+               *aa = slap_operational_hasSubordinate( hs );
+               if ( *aa != NULL ) {
+                       aa = &(*aa)->a_next;
+               }
        }
        
        return 0;