diff options
author | Andrew Tridgell <tridge@samba.org> | 2012-10-31 16:06:03 +1100 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 2012-11-01 15:40:41 +1100 |
commit | 30ffdda45bd3ae602b453c9c1bbdb77ea3de8a8d (patch) | |
tree | 2859583eec07abce06678d464aea79501dd3e554 /lib/ldb/ldb_tdb/ldb_tdb.c | |
parent | fc47b0d03c577730ce0ef9e09092f80c0712d5d0 (diff) | |
download | samba-30ffdda45bd3ae602b453c9c1bbdb77ea3de8a8d.tar.gz samba-30ffdda45bd3ae602b453c9c1bbdb77ea3de8a8d.tar.bz2 samba-30ffdda45bd3ae602b453c9c1bbdb77ea3de8a8d.zip |
ldb: fixed callers for ldb_pack_data() and ldb_unpack_data()
with ltdb_pack_data() and ltdb_unpack_data() now moved into common, we
need to increase the minor version and fixup callers of the API
Note that this relies on struct ldb_val being the same shape as
TDB_DATA, in much the same way as we rely on ldb_val and DATA_BLOB
being the same shape.
Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
Diffstat (limited to 'lib/ldb/ldb_tdb/ldb_tdb.c')
-rw-r--r-- | lib/ldb/ldb_tdb/ldb_tdb.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/ldb/ldb_tdb/ldb_tdb.c b/lib/ldb/ldb_tdb/ldb_tdb.c index 0e7c74c640..860ee146a6 100644 --- a/lib/ldb/ldb_tdb/ldb_tdb.c +++ b/lib/ldb/ldb_tdb/ldb_tdb.c @@ -50,6 +50,7 @@ */ #include "ldb_tdb.h" +#include "ldb_private.h" #include <tdb.h> /* @@ -264,7 +265,7 @@ int ltdb_store(struct ldb_module *module, const struct ldb_message *msg, int flg return LDB_ERR_OTHER; } - ret = ltdb_pack_data(module, msg, &tdb_data); + ret = ldb_pack_data(module, msg, (struct ldb_val *)&tdb_data); if (ret == -1) { talloc_free(tdb_key.dptr); return LDB_ERR_OTHER; @@ -693,7 +694,7 @@ int ltdb_modify_internal(struct ldb_module *module, goto done; } - ret = ltdb_unpack_data(ldb_module_get_ctx(module), &tdb_data, msg2); + ret = ldb_unpack_data(ldb_module_get_ctx(module), (struct ldb_val *)&tdb_data, msg2); free(tdb_data.dptr); if (ret == -1) { ret = LDB_ERR_OTHER; |