git.samba.org
/
sfrench
/
samba-autobuild
/
.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
d4a7543
)
r6937: some minor fixes and updates
author
Stefan Metzmacher
<metze@samba.org>
Mon, 23 May 2005 06:49:17 +0000
(06:49 +0000)
committer
Gerald (Jerry) Carter
<jerry@samba.org>
Wed, 10 Oct 2007 18:16:59 +0000
(13:16 -0500)
metze
(This used to be commit
03b1ff48f97fa81c515f90a398c6f8cde579cb51
)
source4/lib/ldb/modules/skel.c
patch
|
blob
|
history
diff --git
a/source4/lib/ldb/modules/skel.c
b/source4/lib/ldb/modules/skel.c
index 9fb01941c97c4ea01681393ed9b5bbde98d1abe0..505b19a288e0f9b415ddcf9125092d45591940b9 100644
(file)
--- a/
source4/lib/ldb/modules/skel.c
+++ b/
source4/lib/ldb/modules/skel.c
@@
-36,9
+36,9
@@
#include "ldb/include/ldb.h"
#include "ldb/include/ldb_private.h"
#include "ldb/include/ldb.h"
#include "ldb/include/ldb_private.h"
-
const
struct private_data {
+struct private_data {
- c
onst char *error_
string;
+ c
har *err
string;
};
/* search */
};
/* search */
@@
-93,21
+93,23
@@
static const char *skel_errstring(struct ldb_module *module)
static int skel_destructor(void *module_ctx)
{
static int skel_destructor(void *module_ctx)
{
- struct ldb_module *ctx = module_ctx;
+ struct ldb_module *ctx = talloc_get_type(module_ctx, struct ldb_module);
+ struct private_data *data = talloc_get_type(ctx->private_data, struct private_data);
/* put your clean-up functions here */
/* put your clean-up functions here */
+ if (data->errstring) talloc_free(data->errstring);
return 0;
}
static const struct ldb_module_ops skel_ops = {
return 0;
}
static const struct ldb_module_ops skel_ops = {
- "skel",
- skel_search,
- skel_add_record,
- skel_modify_record,
- skel_delete_record,
- skel_rename_record,
- skel_named_lock,
- skel_named_unlock,
- skel_errstring
+
.name =
"skel",
+
.search =
skel_search,
+
.add_record =
skel_add_record,
+
.modify_record =
skel_modify_record,
+
.delete_record =
skel_delete_record,
+
.rename_record =
skel_rename_record,
+
.named_lock =
skel_named_lock,
+
.named_unlock =
skel_named_unlock,
+
.errstring =
skel_errstring
};
#ifdef HAVE_DLOPEN_DISABLED
};
#ifdef HAVE_DLOPEN_DISABLED
@@
-129,7
+131,7
@@
struct ldb_module *skel_module_init(struct ldb_context *ldb, const char *options
return NULL;
}
return NULL;
}
- data->err
or_
string = NULL;
+ data->errstring = NULL;
ctx->private_data = data;
ctx->ldb = ldb;
ctx->private_data = data;
ctx->ldb = ldb;