From 8cdacd9f820aa06e0bde24f1ea8ccc7fdd83c031 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Tue, 12 Dec 2006 18:52:25 +0000 Subject: r20128: get rid of more talloc_get_type() calls metze (This used to be commit cb89f0b8d5a64433374887bcd44e04ad63e4857e) --- source4/lib/ldb/ldb_ildap/ldb_ildap.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'source4') diff --git a/source4/lib/ldb/ldb_ildap/ldb_ildap.c b/source4/lib/ldb/ldb_ildap/ldb_ildap.c index 2e45eef195..4f30d2b1c1 100644 --- a/source4/lib/ldb/ldb_ildap/ldb_ildap.c +++ b/source4/lib/ldb/ldb_ildap/ldb_ildap.c @@ -138,8 +138,8 @@ static int ildb_map_error(struct ildb_private *ildb, NTSTATUS status) static void ildb_request_timeout(struct event_context *ev, struct timed_event *te, struct timeval t, void *private_data) { - struct ldb_handle *handle = talloc_get_type(private_data, struct ldb_handle); - struct ildb_context *ac = talloc_get_type(handle->private_data, struct ildb_context); + struct ildb_context *ac = talloc_get_type(private_data, struct ildb_context); + struct ldb_handle *handle = ac->handle; if (ac->req->state == LDAP_REQUEST_PENDING) { DLIST_REMOVE(ac->req->conn->pending, ac->req); @@ -152,9 +152,9 @@ static void ildb_request_timeout(struct event_context *ev, struct timed_event *t static void ildb_callback(struct ldap_request *req) { - struct ldb_handle *handle = talloc_get_type(req->async.private_data, struct ldb_handle); - struct ildb_context *ac = talloc_get_type(handle->private_data, struct ildb_context); - struct ildb_private *ildb = talloc_get_type(ac->module->private_data, struct ildb_private); + struct ildb_context *ac = talloc_get_type(req->async.private_data, struct ildb_context); + struct ldb_handle *handle = ac->handle; + struct ildb_private *ildb = ac->ildb; NTSTATUS status; int i; @@ -383,13 +383,13 @@ static int ildb_request_send(struct ildb_private *ildb, struct ldap_message *msg talloc_free(req->time_event); req->time_event = NULL; if (r->timeout) { - req->time_event = event_add_timed(req->conn->event.event_ctx, ildb_ac->handle, + req->time_event = event_add_timed(req->conn->event.event_ctx, ildb_ac, timeval_current_ofs(r->timeout, 0), - ildb_request_timeout, ildb_ac->handle); + ildb_request_timeout, ildb_ac); } req->async.fn = ildb_callback; - req->async.private_data = ildb_ac->handle; + req->async.private_data = ildb_ac; return LDB_SUCCESS; } -- cgit