From 30ffdda45bd3ae602b453c9c1bbdb77ea3de8a8d Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Wed, 31 Oct 2012 16:06:03 +1100 Subject: 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 --- lib/ldb/ldb_tdb/ldb_search.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'lib/ldb/ldb_tdb/ldb_search.c') 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 /* @@ -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; -- cgit