From 183c379fe58ca60f5ef2d1f2033d035d4117ac8f Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Mon, 29 Dec 2008 20:24:57 +0100 Subject: s4:lib/tevent: rename structs list="" list="$list event_context:tevent_context" list="$list fd_event:tevent_fd" list="$list timed_event:tevent_timer" for s in $list; do o=`echo $s | cut -d ':' -f1` n=`echo $s | cut -d ':' -f2` r=`git grep "struct $o" |cut -d ':' -f1 |sort -u` files=`echo "$r" | grep -v source3 | grep -v nsswitch | grep -v packaging4` for f in $files; do cat $f | sed -e "s/struct $o/struct $n/g" > $f.tmp mv $f.tmp $f done done metze --- source4/lib/ldb/common/ldb.c | 8 ++++---- source4/lib/ldb/include/ldb.h | 10 +++++----- source4/lib/ldb/include/ldb_private.h | 2 +- source4/lib/ldb/ldb_ildap/ldb_ildap.c | 10 +++++----- source4/lib/ldb/ldb_ldap/ldb_ldap.c | 18 +++++++++--------- source4/lib/ldb/ldb_tdb/ldb_tdb.c | 12 ++++++------ source4/lib/ldb/ldb_tdb/ldb_tdb.h | 2 +- 7 files changed, 31 insertions(+), 31 deletions(-) (limited to 'source4/lib/ldb') diff --git a/source4/lib/ldb/common/ldb.c b/source4/lib/ldb/common/ldb.c index c013565da0..4443362448 100644 --- a/source4/lib/ldb/common/ldb.c +++ b/source4/lib/ldb/common/ldb.c @@ -39,7 +39,7 @@ The mem_ctx is required The event_ctx is required */ -struct ldb_context *ldb_init(TALLOC_CTX *mem_ctx, struct event_context *ev_ctx) +struct ldb_context *ldb_init(TALLOC_CTX *mem_ctx, struct tevent_context *ev_ctx) { struct ldb_context *ldb; int ret; @@ -393,7 +393,7 @@ static int ldb_autotransaction_request(struct ldb_context *ldb, int ldb_wait(struct ldb_handle *handle, enum ldb_wait_type type) { - struct event_context *ev; + struct tevent_context *ev; if (!handle) { return LDB_ERR_UNAVAILABLE; @@ -474,12 +474,12 @@ void ldb_set_create_perms(struct ldb_context *ldb, unsigned int perms) ldb->create_perms = perms; } -void ldb_set_event_context(struct ldb_context *ldb, struct event_context *ev) +void ldb_set_event_context(struct ldb_context *ldb, struct tevent_context *ev) { ldb->ev_ctx = ev; } -struct event_context * ldb_get_event_context(struct ldb_context *ldb) +struct tevent_context * ldb_get_event_context(struct ldb_context *ldb) { return ldb->ev_ctx; } diff --git a/source4/lib/ldb/include/ldb.h b/source4/lib/ldb/include/ldb.h index e2ec869872..28c54f5a3c 100644 --- a/source4/lib/ldb/include/ldb.h +++ b/source4/lib/ldb/include/ldb.h @@ -181,7 +181,7 @@ enum ldb_scope {LDB_SCOPE_DEFAULT=-1, LDB_SCOPE_SUBTREE=2}; struct ldb_context; -struct event_context; +struct tevent_context; /* debugging uses one of the following levels */ enum ldb_debug_level {LDB_DEBUG_FATAL, LDB_DEBUG_ERROR, @@ -795,9 +795,9 @@ int ldb_set_timeout(struct ldb_context *ldb, struct ldb_request *req, int timeou int ldb_set_timeout_from_prev_req(struct ldb_context *ldb, struct ldb_request *oldreq, struct ldb_request *newreq); void ldb_set_create_perms(struct ldb_context *ldb, unsigned int perms); void ldb_set_modules_dir(struct ldb_context *ldb, const char *path); -struct event_context; -void ldb_set_event_context(struct ldb_context *ldb, struct event_context *ev); -struct event_context * ldb_get_event_context(struct ldb_context *ldb); +struct tevent_context; +void ldb_set_event_context(struct ldb_context *ldb, struct tevent_context *ev); +struct tevent_context * ldb_get_event_context(struct ldb_context *ldb); /** Initialise ldbs' global information @@ -819,7 +819,7 @@ int ldb_global_init(void); \return pointer to ldb_context that should be free'd (using talloc_free()) at the end of the program. */ -struct ldb_context *ldb_init(TALLOC_CTX *mem_ctx, struct event_context *ev_ctx); +struct ldb_context *ldb_init(TALLOC_CTX *mem_ctx, struct tevent_context *ev_ctx); /** Connect to a database. diff --git a/source4/lib/ldb/include/ldb_private.h b/source4/lib/ldb/include/ldb_private.h index c065288279..cf4017ef14 100644 --- a/source4/lib/ldb/include/ldb_private.h +++ b/source4/lib/ldb/include/ldb_private.h @@ -123,7 +123,7 @@ struct ldb_context { char *modules_dir; - struct event_context *ev_ctx; + struct tevent_context *ev_ctx; }; #ifndef ARRAY_SIZE diff --git a/source4/lib/ldb/ldb_ildap/ldb_ildap.c b/source4/lib/ldb/ldb_ildap/ldb_ildap.c index a95859276f..9e31bc62bb 100644 --- a/source4/lib/ldb/ldb_ildap/ldb_ildap.c +++ b/source4/lib/ldb/ldb_ildap/ldb_ildap.c @@ -52,7 +52,7 @@ struct ildb_private { struct ldap_connection *ldap; - struct event_context *event_ctx; + struct tevent_context *event_ctx; }; struct ildb_context { @@ -92,8 +92,8 @@ static void ildb_request_done(struct ildb_context *ctx, ctx->req->callback(ctx->req, ares); } -static void ildb_auto_done_callback(struct event_context *ev, - struct timed_event *te, +static void ildb_auto_done_callback(struct tevent_context *ev, + struct tevent_timer *te, struct timeval t, void *private_data) { @@ -182,7 +182,7 @@ static int ildb_map_error(struct ldb_module *module, NTSTATUS status) return LDB_ERR_OPERATIONS_ERROR; } -static void ildb_request_timeout(struct event_context *ev, struct timed_event *te, +static void ildb_request_timeout(struct tevent_context *ev, struct tevent_timer *te, struct timeval t, void *private_data) { struct ildb_context *ac = talloc_get_type(private_data, struct ildb_context); @@ -661,7 +661,7 @@ static int ildb_handle_request(struct ldb_module *module, struct ldb_request *re { struct ildb_private *ildb; struct ildb_context *ac; - struct timed_event *te; + struct tevent_timer *te; int ret; ildb = talloc_get_type(module->private_data, struct ildb_private); diff --git a/source4/lib/ldb/ldb_ldap/ldb_ldap.c b/source4/lib/ldb/ldb_ldap/ldb_ldap.c index 9f8b3e9f35..8e053818e5 100644 --- a/source4/lib/ldb/ldb_ldap/ldb_ldap.c +++ b/source4/lib/ldb/ldb_ldap/ldb_ldap.c @@ -619,8 +619,8 @@ free_and_return: return lret; } -static void lldb_timeout(struct event_context *ev, - struct timed_event *te, +static void lldb_timeout(struct tevent_context *ev, + struct tevent_timer *te, struct timeval t, void *private_data) { @@ -630,13 +630,13 @@ static void lldb_timeout(struct event_context *ev, lldb_request_done(ac->req, NULL, LDB_ERR_TIME_LIMIT_EXCEEDED); } -static void lldb_callback(struct event_context *ev, - struct timed_event *te, +static void lldb_callback(struct tevent_context *ev, + struct tevent_timer *te, struct timeval t, void *private_data) { struct lldb_context *ac; - struct timed_event *lte; + struct tevent_timer *lte; struct timeval tv; LDAPMessage *result; int lret; @@ -701,8 +701,8 @@ static bool lldb_dn_is_special(struct ldb_request *req) return false; } -static void lldb_auto_done_callback(struct event_context *ev, - struct timed_event *te, +static void lldb_auto_done_callback(struct tevent_context *ev, + struct tevent_timer *te, struct timeval t, void *private_data) { @@ -716,8 +716,8 @@ static int lldb_handle_request(struct ldb_module *module, struct ldb_request *re { struct lldb_private *lldb; struct lldb_context *ac; - struct event_context *ev; - struct timed_event *te; + struct tevent_context *ev; + struct tevent_timer *te; struct timeval tv; int ret; diff --git a/source4/lib/ldb/ldb_tdb/ldb_tdb.c b/source4/lib/ldb/ldb_tdb/ldb_tdb.c index ea460def65..76469e356b 100644 --- a/source4/lib/ldb/ldb_tdb/ldb_tdb.c +++ b/source4/lib/ldb/ldb_tdb/ldb_tdb.c @@ -999,8 +999,8 @@ static void ltdb_request_done(struct ldb_request *req, int error) req->callback(req, ares); } -static void ltdb_timeout(struct event_context *ev, - struct timed_event *te, +static void ltdb_timeout(struct tevent_context *ev, + struct tevent_timer *te, struct timeval t, void *private_data) { @@ -1051,8 +1051,8 @@ static void ltdb_handle_extended(struct ltdb_context *ctx) ltdb_request_extended_done(ctx->req, ext, ret); } -static void ltdb_callback(struct event_context *ev, - struct timed_event *te, +static void ltdb_callback(struct tevent_context *ev, + struct tevent_timer *te, struct timeval t, void *private_data) { @@ -1095,9 +1095,9 @@ static void ltdb_callback(struct event_context *ev, static int ltdb_handle_request(struct ldb_module *module, struct ldb_request *req) { - struct event_context *ev; + struct tevent_context *ev; struct ltdb_context *ac; - struct timed_event *te; + struct tevent_timer *te; struct timeval tv; if (check_critical_controls(req->controls)) { diff --git a/source4/lib/ldb/ldb_tdb/ldb_tdb.h b/source4/lib/ldb/ldb_tdb/ldb_tdb.h index 7b9a76501f..b373d37b7e 100644 --- a/source4/lib/ldb/ldb_tdb/ldb_tdb.h +++ b/source4/lib/ldb/ldb_tdb/ldb_tdb.h @@ -51,7 +51,7 @@ struct ltdb_context { struct ldb_dn *base; enum ldb_scope scope; const char * const *attrs; - struct timed_event *timeout_event; + struct tevent_timer *timeout_event; }; /* special record types */ -- cgit