git.samba.org
/
metze
/
samba4wins
/
test.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4bf0b1d
)
r19362: - don't need to store the baseinfo message after cache load
author
Stefan Metzmacher
<metze@sernet.de>
Sat, 9 Feb 2008 11:24:36 +0000
(12:24 +0100)
committer
Stefan Metzmacher
<metze@sernet.de>
Sat, 9 Feb 2008 11:35:11 +0000
(12:35 +0100)
(load cache at startup, this fixes the open of a non existing ldb)
metze
(cherry picked parts from commit
3bf76db42dc6dde5d71083216dba819869b31c75
)
source/lib/ldb/ldb_tdb/ldb_tdb.c
patch
|
blob
|
history
diff --git
a/source/lib/ldb/ldb_tdb/ldb_tdb.c
b/source/lib/ldb/ldb_tdb/ldb_tdb.c
index bdb3a9873ccde721f6adc785a76f47b270fa7d4c..58e6dee590c31bf0b2545067b3fd9df81419754d 100644
(file)
--- a/
source/lib/ldb/ldb_tdb/ldb_tdb.c
+++ b/
source/lib/ldb/ldb_tdb/ldb_tdb.c
@@
-853,6
+853,13
@@
int ltdb_connect(struct ldb_context *ldb, const char *url,
ldb->modules->prev = ldb->modules->next = NULL;
ldb->modules->private_data = ltdb;
ldb->modules->ops = <db_ops;
+ talloc_steal(ldb->modules, ltdb);
+
+ if (ltdb_cache_load(ldb->modules) != 0) {
+ ldb_debug(ldb, LDB_DEBUG_ERROR, "Unable to load ltdb cache\n");
+ talloc_free(ldb->modules);
+ return -1;
+ }
return 0;
}