diff options
author | Simo Sorce <idra@samba.org> | 2006-01-06 16:12:45 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 13:49:48 -0500 |
commit | dbef4d76de92c3388f4e1819a76d6febf90be290 (patch) | |
tree | 9de9afa682085de347e6cdd632a9d0e06baa26c7 /source4/lib/ldb/include/ldb_private.h | |
parent | 8f4dc51345dc48f5a6bfb1a49297f205ba53ef0a (diff) | |
download | samba-dbef4d76de92c3388f4e1819a76d6febf90be290.tar.gz samba-dbef4d76de92c3388f4e1819a76d6febf90be290.tar.bz2 samba-dbef4d76de92c3388f4e1819a76d6febf90be290.zip |
r12743: Remove the ugly way we had to make a second stage init and introduce
a second_stage_init private function for modules that need a second stage init.
Simo.
(This used to be commit 5e8b365fa2d93801a5de1d9ea76ce9d5546bd248)
Diffstat (limited to 'source4/lib/ldb/include/ldb_private.h')
-rw-r--r-- | source4/lib/ldb/include/ldb_private.h | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/source4/lib/ldb/include/ldb_private.h b/source4/lib/ldb/include/ldb_private.h index e8a4d1820a..4ef7c5a96d 100644 --- a/source4/lib/ldb/include/ldb_private.h +++ b/source4/lib/ldb/include/ldb_private.h @@ -60,6 +60,7 @@ struct ldb_module_ops { int (*start_transaction)(struct ldb_module *); int (*end_transaction)(struct ldb_module *); int (*del_transaction)(struct ldb_module *); + int (*second_stage_init)(struct ldb_module *); }; @@ -104,9 +105,7 @@ struct ldb_context { }; /* the modules init function */ -#define LDB_MODULES_INIT_STAGE_1 1 -#define LDB_MODULES_INIT_STAGE_2 2 -typedef struct ldb_module *(*ldb_module_init_t)(struct ldb_context *, int stage, const char **); +typedef struct ldb_module *(*ldb_module_init_t)(struct ldb_context *, const char **); #ifndef ARRAY_SIZE #define ARRAY_SIZE(a) (sizeof(a)/sizeof(a[0])) @@ -117,6 +116,9 @@ typedef struct ldb_module *(*ldb_module_init_t)(struct ldb_context *, int stage, */ #define ldb_oom(ldb) ldb_debug_set(ldb, LDB_DEBUG_FATAL, "ldb out of memory at %s:%d\n", __FILE__, __LINE__) +/* The following definitions come from lib/ldb/common/ldb.c */ +int ldb_second_stage_init(struct ldb_context *ldb); + /* The following definitions come from lib/ldb/common/ldb_modules.c */ int ldb_load_modules(struct ldb_context *ldb, const char *options[]); @@ -124,6 +126,7 @@ int ldb_next_request(struct ldb_module *module, struct ldb_request *request); int ldb_next_start_trans(struct ldb_module *module); int ldb_next_end_trans(struct ldb_module *module); int ldb_next_del_trans(struct ldb_module *module); +int ldb_next_second_stage_init(struct ldb_module *module); void ldb_set_errstring(struct ldb_module *module, char *err_string); @@ -149,12 +152,12 @@ int lsqlite3_connect(struct ldb_context *ldb, const char *url, unsigned int flags, const char *options[]); -struct ldb_module *objectclass_module_init(struct ldb_context *ldb, int stage, const char *options[]); -struct ldb_module *operational_module_init(struct ldb_context *ldb, int stage, const char *options[]); -struct ldb_module *paged_results_module_init(struct ldb_context *ldb, int stage, const char *options[]); -struct ldb_module *rdn_name_module_init(struct ldb_context *ldb, int stage, const char *options[]); -struct ldb_module *schema_module_init(struct ldb_context *ldb, int stage, const char *options[]); -struct ldb_module *server_sort_module_init(struct ldb_context *ldb, int stage, const char *options[]); +struct ldb_module *objectclass_module_init(struct ldb_context *ldb, const char *options[]); +struct ldb_module *operational_module_init(struct ldb_context *ldb, const char *options[]); +struct ldb_module *paged_results_module_init(struct ldb_context *ldb, const char *options[]); +struct ldb_module *rdn_name_module_init(struct ldb_context *ldb, const char *options[]); +struct ldb_module *schema_module_init(struct ldb_context *ldb, const char *options[]); +struct ldb_module *server_sort_module_init(struct ldb_context *ldb, const char *options[]); int ldb_match_msg(struct ldb_context *ldb, |