summaryrefslogtreecommitdiff
path: root/source3/utils
diff options
context:
space:
mode:
authorMichael Adam <obnox@samba.org>2012-06-26 15:02:41 +0200
committerMichael Adam <obnox@samba.org>2012-06-26 19:57:19 +0200
commita3ed47a09bfaf3bf100547a4d97e9d8573382a3d (patch)
tree017d1147f82b6eaabd19e9f096af8c673fccc0d9 /source3/utils
parentc55a6dae655716539edd3e4dd8b4d61e22f1858e (diff)
downloadsamba-a3ed47a09bfaf3bf100547a4d97e9d8573382a3d.tar.gz
samba-a3ed47a09bfaf3bf100547a4d97e9d8573382a3d.tar.bz2
samba-a3ed47a09bfaf3bf100547a4d97e9d8573382a3d.zip
s3:net registry import: improve regdb_open/close layering
Pair-Programmed-With: Gregor Beck <gbeck@sernet.de>
Diffstat (limited to 'source3/utils')
-rw-r--r--source3/utils/net_registry.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/source3/utils/net_registry.c b/source3/utils/net_registry.c
index 763ed0d918..5d93a71390 100644
--- a/source3/utils/net_registry.c
+++ b/source3/utils/net_registry.c
@@ -1276,14 +1276,15 @@ static int net_registry_import(struct net_context *c, int argc,
d_printf("%s\n%s",
_("Example:"),
_("net registry import file.reg enc=CP1252\n"));
- goto done;
+ return -1;
}
werr = regdb_open();
if (!W_ERROR_IS_OK(werr)) {
d_printf("Failed to open regdb: %s\n", win_errstr(werr));
- goto done;
+ return -1;
}
+
werr = regdb_transaction_start();
if (!W_ERROR_IS_OK(werr)) {
d_printf("Failed to start transaction on regdb: %s\n",
@@ -1306,8 +1307,8 @@ static int net_registry_import(struct net_context *c, int argc,
}
}
- regdb_close();
done:
+ regdb_close();
return ret;
}
/**@}*/