diff options
author | Michael Adam <obnox@samba.org> | 2008-02-19 01:04:31 +0100 |
---|---|---|
committer | Michael Adam <obnox@samba.org> | 2008-02-19 09:09:04 +0100 |
commit | 9e9cd40a7d755b19ad70011409d213c9e9013fe6 (patch) | |
tree | 0c71720fc8b0521c27db64dbec60b65d1e9f92ee | |
parent | 3e3df1bfe2ebce8b5c26cb5fb7d4c2f5c422fd97 (diff) | |
download | samba-9e9cd40a7d755b19ad70011409d213c9e9013fe6.tar.gz samba-9e9cd40a7d755b19ad70011409d213c9e9013fe6.tar.bz2 samba-9e9cd40a7d755b19ad70011409d213c9e9013fe6.zip |
Make regdb_init() behave like regdb_open() when registry is already opened.
I.e. increment the refcounter.
Michael
(This used to be commit 951d3fae2cbea09cc4e1806cbf0a94ecdfcee8d5)
-rw-r--r-- | source3/registry/reg_backend_db.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/source3/registry/reg_backend_db.c b/source3/registry/reg_backend_db.c index e162fb587f..52e0fd4289 100644 --- a/source3/registry/reg_backend_db.c +++ b/source3/registry/reg_backend_db.c @@ -258,8 +258,11 @@ bool regdb_init( void ) const char *vstring = "INFO/version"; uint32 vers_id; - if ( tdb_reg ) + if ( tdb_reg ) { + DEBUG(10,("regdb_init: incrementing refcount (%d)\n", tdb_refcount)); + tdb_refcount++; return true; + } if ( !(tdb_reg = tdb_wrap_open(NULL, state_path("registry.tdb"), 0, REG_TDB_FLAGS, O_RDWR, 0600)) ) { |