]> git.sur5r.net Git - openldap/blobdiff - servers/slapd/back-sql/operational.c
re-fix previus commit the other way 'round (rids are < 1000)
[openldap] / servers / slapd / back-sql / operational.c
index e99741a6d9b4ae530e504a5f971f32c889f661cf..60252f6d49f3c129bae71b0c03bc8e09b46e47e0 100644 (file)
@@ -1,7 +1,7 @@
 /* $OpenLDAP$ */
 /* This work is part of OpenLDAP Software <http://www.openldap.org/>.
  *
- * Copyright 1999-2005 The OpenLDAP Foundation.
+ * Copyright 1999-2007 The OpenLDAP Foundation.
  * Portions Copyright 1999 Dmitry Kovalev.
  * Portions Copyright 2002 Pierangelo Masarati.
  * All rights reserved.
@@ -53,8 +53,7 @@ backsql_operational_entryUUID( backsql_info *bi, backsql_entryID *id )
                return NULL;
        }
 
-       a = ch_malloc( sizeof( Attribute ) );
-       a->a_desc = desc;
+       a = attr_alloc( desc );
 
        a->a_vals = (BerVarray) ch_malloc( 2 * sizeof( struct berval ) );
        a->a_vals[ 0 ] = val;
@@ -63,9 +62,6 @@ backsql_operational_entryUUID( backsql_info *bi, backsql_entryID *id )
        a->a_nvals = (BerVarray) ch_malloc( 2 * sizeof( struct berval ) );
        a->a_nvals[ 0 ] = nval;
        BER_BVZERO( &a->a_nvals[ 1 ] );
-       
-       a->a_next = NULL;
-       a->a_flags = 0;
 
        return a;
 }
@@ -77,8 +73,7 @@ backsql_operational_entryCSN( Operation *op )
        struct berval   entryCSN;
        Attribute       *a;
 
-       a = ch_malloc( sizeof( Attribute ) );
-       a->a_desc = slap_schema.si_ad_entryCSN;
+       a = attr_alloc( slap_schema.si_ad_entryCSN );
        a->a_vals = ch_malloc( 2 * sizeof( struct berval ) );
        BER_BVZERO( &a->a_vals[ 1 ] );
 
@@ -100,9 +95,6 @@ backsql_operational_entryCSN( Operation *op )
 
        a->a_nvals = a->a_vals;
 
-       a->a_next = NULL;
-       a->a_flags = 0;
-
        return a;
 }