summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2006-12-12 18:52:25 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 14:29:11 -0500
commit8cdacd9f820aa06e0bde24f1ea8ccc7fdd83c031 (patch)
treedc5526e5761dcd5d76d84fb773d9adcb412575d1
parentecc8ef51cbca48fe1e9ccb2069c3aa7c12d1d2b9 (diff)
downloadsamba-8cdacd9f820aa06e0bde24f1ea8ccc7fdd83c031.tar.gz
samba-8cdacd9f820aa06e0bde24f1ea8ccc7fdd83c031.tar.bz2
samba-8cdacd9f820aa06e0bde24f1ea8ccc7fdd83c031.zip
r20128: get rid of more talloc_get_type() calls
metze (This used to be commit cb89f0b8d5a64433374887bcd44e04ad63e4857e)
-rw-r--r--source4/lib/ldb/ldb_ildap/ldb_ildap.c16
1 files changed, 8 insertions, 8 deletions
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;
}