summaryrefslogtreecommitdiff
path: root/lib/ldb/ldb_tdb/ldb_search.c
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2012-10-31 16:06:03 +1100
committerAndrew Tridgell <tridge@samba.org>2012-11-01 15:40:41 +1100
commit30ffdda45bd3ae602b453c9c1bbdb77ea3de8a8d (patch)
tree2859583eec07abce06678d464aea79501dd3e554 /lib/ldb/ldb_tdb/ldb_search.c
parentfc47b0d03c577730ce0ef9e09092f80c0712d5d0 (diff)
downloadsamba-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_search.c')
-rw-r--r--lib/ldb/ldb_tdb/ldb_search.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/ldb/ldb_tdb/ldb_search.c b/lib/ldb/ldb_tdb/ldb_search.c
index 4fb8510377..26296c7f7d 100644
--- a/lib/ldb/ldb_tdb/ldb_search.c
+++ b/lib/ldb/ldb_tdb/ldb_search.c
@@ -32,6 +32,7 @@
*/
#include "ldb_tdb.h"
+#include "ldb_private.h"
#include <tdb.h>
/*
@@ -245,7 +246,7 @@ static int ltdb_parse_data_unpack(TDB_DATA key, TDB_DATA data,
struct ltdb_parse_data_unpack_ctx *ctx = private_data;
struct ldb_context *ldb = ldb_module_get_ctx(ctx->module);
- int ret = ltdb_unpack_data(ldb, &data, ctx->msg);
+ int ret = ldb_unpack_data(ldb, (struct ldb_val *)&data, ctx->msg);
if (ret == -1) {
ldb_debug(ldb, LDB_DEBUG_ERROR, "Invalid data for index %*.*s\n",
(int)key.dsize, (int)key.dsize, key.dptr);
@@ -440,7 +441,7 @@ static int search_func(struct tdb_context *tdb, TDB_DATA key, TDB_DATA data, voi
}
/* unpack the record */
- ret = ltdb_unpack_data(ldb, &data, msg);
+ ret = ldb_unpack_data(ldb, (struct ldb_val *)&data, msg);
if (ret == -1) {
talloc_free(msg);
return -1;