summaryrefslogtreecommitdiff
path: root/source4/lib/ldb/ldb_tdb/ldb_pack.c
diff options
context:
space:
mode:
authorSimo Sorce <idra@samba.org>2009-01-29 18:39:30 -0500
committerSimo Sorce <idra@samba.org>2009-01-30 01:02:03 -0500
commit380874ef863866c94c999ef53252b9d30df65e88 (patch)
treeaafdb720253d5a6013e2a23a0e81b0a9b90f054b /source4/lib/ldb/ldb_tdb/ldb_pack.c
parenta5f0640bf99e6f7e38b0b1e7a7a56f8f58ec7e47 (diff)
downloadsamba-380874ef863866c94c999ef53252b9d30df65e88.tar.gz
samba-380874ef863866c94c999ef53252b9d30df65e88.tar.bz2
samba-380874ef863866c94c999ef53252b9d30df65e88.zip
Fix the mess with ldb includes.
Separate again the public from the private headers. Add a new header specific for modules. Also add service function for modules as now ldb_context and ldb_module are opaque structures for them.
Diffstat (limited to 'source4/lib/ldb/ldb_tdb/ldb_pack.c')
-rw-r--r--source4/lib/ldb/ldb_tdb/ldb_pack.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/source4/lib/ldb/ldb_tdb/ldb_pack.c b/source4/lib/ldb/ldb_tdb/ldb_pack.c
index afb07dcbca..1995606f88 100644
--- a/source4/lib/ldb/ldb_tdb/ldb_pack.c
+++ b/source4/lib/ldb/ldb_tdb/ldb_pack.c
@@ -31,7 +31,6 @@
* Author: Andrew Tridgell
*/
-#include "ldb_includes.h"
#include "ldb_tdb.h"
/* change this if the data format ever changes */
@@ -79,13 +78,15 @@ int ltdb_pack_data(struct ldb_module *module,
const struct ldb_message *message,
struct TDB_DATA *data)
{
- struct ldb_context *ldb = module->ldb;
+ struct ldb_context *ldb;
unsigned int i, j, real_elements=0;
size_t size;
const char *dn;
uint8_t *p;
size_t len;
+ ldb = ldb_module_get_ctx(module);
+
dn = ldb_dn_get_linearized(message->dn);
if (dn == NULL) {
errno = ENOMEM;
@@ -159,13 +160,14 @@ int ltdb_unpack_data(struct ldb_module *module,
const struct TDB_DATA *data,
struct ldb_message *message)
{
- struct ldb_context *ldb = module->ldb;
+ struct ldb_context *ldb;
uint8_t *p;
unsigned int remaining;
unsigned int i, j;
unsigned format;
size_t len;
+ ldb = ldb_module_get_ctx(module);
message->elements = NULL;
p = data->dptr;