registry: rename tdb_refcount to regdb_refcount after change to dbwrap.
authorMichael Adam <obnox@samba.org>
Sun, 16 Mar 2008 22:08:33 +0000 (23:08 +0100)
committerMichael Adam <obnox@samba.org>
Mon, 17 Mar 2008 07:22:32 +0000 (08:22 +0100)
Michael
(This used to be commit d39957e2c9216ef01b2ef53863c0ef5d3a9b5fee)

source3/registry/reg_backend_db.c

index ab437fb97b68ed770819a7b6d173e1eddc9a95f0..169f8f16a78d413d67938e2a21c1e58229aca244 100644 (file)
@@ -25,7 +25,7 @@
 #define DBGC_CLASS DBGC_REGISTRY
 
 static struct db_context *regdb = NULL;
-static int tdb_refcount;
+static int regdb_refcount;
 
 /* List the deepest path into the registry.  All part components will be created.*/
 
@@ -259,8 +259,8 @@ bool regdb_init( void )
        uint32 vers_id;
 
        if ( regdb ) {
-               DEBUG(10,("regdb_init: incrementing refcount (%d)\n", tdb_refcount));
-               tdb_refcount++;
+               DEBUG(10,("regdb_init: incrementing refcount (%d)\n", regdb_refcount));
+               regdb_refcount++;
                return true;
        }
 
@@ -276,7 +276,7 @@ bool regdb_init( void )
                DEBUG(10,("regdb_init: Successfully created registry tdb\n"));
        }
 
-       tdb_refcount = 1;
+       regdb_refcount = 1;
 
        vers_id = dbwrap_fetch_int32(regdb, vstring);
 
@@ -305,8 +305,8 @@ WERROR regdb_open( void )
        WERROR result = WERR_OK;
 
        if ( regdb ) {
-               DEBUG(10,("regdb_open: incrementing refcount (%d)\n", tdb_refcount));
-               tdb_refcount++;
+               DEBUG(10,("regdb_open: incrementing refcount (%d)\n", regdb_refcount));
+               regdb_refcount++;
                return WERR_OK;
        }
        
@@ -321,8 +321,8 @@ WERROR regdb_open( void )
 
        unbecome_root();
 
-       tdb_refcount = 1;
-       DEBUG(10,("regdb_open: refcount reset (%d)\n", tdb_refcount));
+       regdb_refcount = 1;
+       DEBUG(10,("regdb_open: refcount reset (%d)\n", regdb_refcount));
 
        return result;
 }
@@ -332,18 +332,18 @@ WERROR regdb_open( void )
 
 int regdb_close( void )
 {
-       if (tdb_refcount == 0) {
+       if (regdb_refcount == 0) {
                return 0;
        }
 
-       tdb_refcount--;
+       regdb_refcount--;
 
-       DEBUG(10,("regdb_close: decrementing refcount (%d)\n", tdb_refcount));
+       DEBUG(10,("regdb_close: decrementing refcount (%d)\n", regdb_refcount));
 
-       if ( tdb_refcount > 0 )
+       if ( regdb_refcount > 0 )
                return 0;
 
-       SMB_ASSERT( tdb_refcount >= 0 );
+       SMB_ASSERT( regdb_refcount >= 0 );
 
        TALLOC_FREE(regdb);
        return 0;