]> git.sur5r.net Git - openldap/commitdiff
Fix nextid
authorKurt Zeilenga <kurt@openldap.org>
Tue, 26 Sep 2000 00:56:33 +0000 (00:56 +0000)
committerKurt Zeilenga <kurt@openldap.org>
Tue, 26 Sep 2000 00:56:33 +0000 (00:56 +0000)
servers/slapd/back-bdb/nextid.c

index ae61be9e5a5440be37d5801f133e1b87d4b2c5ad..d3278f3e62b0399cbe3c6c9cf5c4b876a639f908 100644 (file)
@@ -70,10 +70,10 @@ retry:      if( tid != NULL ) {
                break;
 
        case 0:
-               if ( data.size != sizeof(ID) ) {
+               if ( data.size != sizeof( id ) ) {
                        Debug( LDAP_DEBUG_ANY,
                                "=> bdb_next_id: get size mismatch: expected %ld, got %ld\n",
-                               (long) sizeof( ID ), (long) data.size, 0 );
+                               (long) sizeof( id ), (long) data.size, 0 );
                        rc = -1;
                        goto done;
                }
@@ -87,6 +87,7 @@ retry:        if( tid != NULL ) {
        }
 
        id++;
+       data.size = sizeof( id );
 
        /* put new value */
        rc = bdb->bi_nextid->bdi_db->put( bdb->bi_nextid->bdi_db,