From 890e7719cf679108e7a74a660f20a40a32d7d552 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Fri, 23 Oct 2009 14:50:56 +1100 Subject: s4-ldb: move the tdb_reopen_all() calls to ldb_wrap.c --- source4/lib/ldb_wrap.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'source4/lib/ldb_wrap.c') diff --git a/source4/lib/ldb_wrap.c b/source4/lib/ldb_wrap.c index 1166acd3a2..ecd7bf4554 100644 --- a/source4/lib/ldb_wrap.c +++ b/source4/lib/ldb_wrap.c @@ -35,6 +35,7 @@ #include "dsdb/samdb/samdb.h" #include "param/param.h" #include "dlinklist.h" +#include "../tdb/include/tdb.h" /* this is used to catch debug messages from ldb @@ -263,7 +264,13 @@ void ldb_wrap_fork_hook(void) struct ldb_wrap *w; for (w=ldb_wrap_list; w; w=w->next) { - ldb_transaction_cancel_noerr(w->ldb); + if (ldb_transaction_cancel_noerr(w->ldb) != LDB_SUCCESS) { + smb_panic("Failed to cancel child transactions\n"); + } } + + if (tdb_reopen_all(1) == -1) { + smb_panic("tdb_reopen_all failed\n"); + } } -- cgit