diff options
author | Michael Adam <obnox@samba.org> | 2011-11-09 11:14:38 +0100 |
---|---|---|
committer | Michael Adam <obnox@samba.org> | 2011-11-09 15:06:58 +0100 |
commit | 6727429aea4505d085bcf6f22dd316e7123f0e83 (patch) | |
tree | 7716d309b9f923058b13b527c6250e42fd96727c /source3 | |
parent | e66ceb6566b532ea7f191dd2a0ed661f7086609e (diff) | |
download | samba-6727429aea4505d085bcf6f22dd316e7123f0e83.tar.gz samba-6727429aea4505d085bcf6f22dd316e7123f0e83.tar.bz2 samba-6727429aea4505d085bcf6f22dd316e7123f0e83.zip |
s3:registry: prevent unnecessary transactions in regdb_init
Skip the transaction for the upgrade code, if the database
is already at code-level.
Autobuild-User: Michael Adam <obnox@samba.org>
Autobuild-Date: Wed Nov 9 15:06:59 CET 2011 on sn-devel-104
Diffstat (limited to 'source3')
-rw-r--r-- | source3/registry/reg_backend_db.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/source3/registry/reg_backend_db.c b/source3/registry/reg_backend_db.c index 7fa6249cec..4d4aaeb4b5 100644 --- a/source3/registry/reg_backend_db.c +++ b/source3/registry/reg_backend_db.c @@ -687,6 +687,10 @@ WERROR regdb_init(void) vers_id = REGDB_VERSION_V1; } + if (vers_id == REGDB_CODE_VERSION) { + return WERR_OK; + } + if (vers_id > REGDB_CODE_VERSION || vers_id == 0) { DEBUG(0, ("regdb_init: unknown registry version %d " "(code version = %d), refusing initialization\n", |