diff options
author | Simo Sorce <idra@samba.org> | 2005-01-12 16:00:01 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 13:08:47 -0500 |
commit | a2f77f979d7271a9708ed06f43b00ffb10ec7f4c (patch) | |
tree | f9de8a02597f95ba9c7af1c2086a69cafacb3a87 /source4/lib/ldb/ldb_tdb/ldb_cache.c | |
parent | 7588b41e153ebd84c974f7289847bcd05f32ba4b (diff) | |
download | samba-a2f77f979d7271a9708ed06f43b00ffb10ec7f4c.tar.gz samba-a2f77f979d7271a9708ed06f43b00ffb10ec7f4c.tar.bz2 samba-a2f77f979d7271a9708ed06f43b00ffb10ec7f4c.zip |
r4714: move the ldb code to the new talloc interface (eg remove _p suffix)
this helps standalone building of ldb
renew the schema module
split code into functions to improve readability and code reuse
add and modify works correctly but we need a proper testsuite
Simo
(This used to be commit a681ae365ff1b5a2771b42ebd90336651ce1e513)
Diffstat (limited to 'source4/lib/ldb/ldb_tdb/ldb_cache.c')
-rw-r--r-- | source4/lib/ldb/ldb_tdb/ldb_cache.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/source4/lib/ldb/ldb_tdb/ldb_cache.c b/source4/lib/ldb/ldb_tdb/ldb_cache.c index ebdfdb7bed..8cc6616d52 100644 --- a/source4/lib/ldb/ldb_tdb/ldb_cache.c +++ b/source4/lib/ldb/ldb_tdb/ldb_cache.c @@ -54,7 +54,7 @@ static int ltdb_baseinfo_init(struct ldb_module *module) ltdb->sequence_number = atof(initial_sequence_number); - msg = talloc_p(ltdb, struct ldb_message); + msg = talloc(ltdb, struct ldb_message); if (msg == NULL) { goto failed; } @@ -120,11 +120,11 @@ int ltdb_cache_load(struct ldb_module *module) double seq; if (ltdb->cache == NULL) { - ltdb->cache = talloc_zero_p(ltdb, struct ltdb_cache); + ltdb->cache = talloc_zero(ltdb, struct ltdb_cache); if (ltdb->cache == NULL) goto failed; - ltdb->cache->indexlist = talloc_zero_p(ltdb->cache, struct ldb_message); - ltdb->cache->subclasses = talloc_zero_p(ltdb->cache, struct ldb_message); - ltdb->cache->attributes = talloc_zero_p(ltdb->cache, struct ldb_message); + ltdb->cache->indexlist = talloc_zero(ltdb->cache, struct ldb_message); + ltdb->cache->subclasses = talloc_zero(ltdb->cache, struct ldb_message); + ltdb->cache->attributes = talloc_zero(ltdb->cache, struct ldb_message); if (ltdb->cache->indexlist == NULL || ltdb->cache->subclasses == NULL || ltdb->cache->attributes == NULL) { @@ -133,7 +133,7 @@ int ltdb_cache_load(struct ldb_module *module) } talloc_free(ltdb->cache->baseinfo); - ltdb->cache->baseinfo = talloc_p(ltdb->cache, struct ldb_message); + ltdb->cache->baseinfo = talloc(ltdb->cache, struct ldb_message); if (ltdb->cache->baseinfo == NULL) goto failed; if (ltdb_search_dn1(module, LTDB_BASEINFO, ltdb->cache->baseinfo) == -1) { @@ -165,9 +165,9 @@ int ltdb_cache_load(struct ldb_module *module) talloc_free(ltdb->cache->subclasses); talloc_free(ltdb->cache->attributes); - ltdb->cache->indexlist = talloc_zero_p(ltdb->cache, struct ldb_message); - ltdb->cache->subclasses = talloc_zero_p(ltdb->cache, struct ldb_message); - ltdb->cache->attributes = talloc_zero_p(ltdb->cache, struct ldb_message); + ltdb->cache->indexlist = talloc_zero(ltdb->cache, struct ldb_message); + ltdb->cache->subclasses = talloc_zero(ltdb->cache, struct ldb_message); + ltdb->cache->attributes = talloc_zero(ltdb->cache, struct ldb_message); if (ltdb->cache->indexlist == NULL || ltdb->cache->subclasses == NULL || ltdb->cache->attributes == NULL) { @@ -204,7 +204,7 @@ int ltdb_increase_sequence_number(struct ldb_module *module) char *s = NULL; int ret; - msg = talloc_p(ltdb, struct ldb_message); + msg = talloc(ltdb, struct ldb_message); if (msg == NULL) { errno = ENOMEM; return -1; |