summaryrefslogtreecommitdiff
path: root/source4/libcli/ldap/ldap_client.c
diff options
context:
space:
mode:
authorSimo Sorce <idra@samba.org>2006-02-22 01:31:35 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:51:59 -0500
commit00fe70e5b917769418f68eaa255d3a06a9a08ce7 (patch)
tree7fe1d0d71e1771a3365a5dfda3ec4058b1bb2de1 /source4/libcli/ldap/ldap_client.c
parentf490434c0f1f8e63de478c6d65f264277257968a (diff)
downloadsamba-00fe70e5b917769418f68eaa255d3a06a9a08ce7.tar.gz
samba-00fe70e5b917769418f68eaa255d3a06a9a08ce7.tar.bz2
samba-00fe70e5b917769418f68eaa255d3a06a9a08ce7.zip
r13609: Get in the initial work on making ldb async
Currently only ldb_ildap is async, the plan is to first make all backend support the async calls, and then remove the sync functions from backends and keep the only in the API. Modules will need to be transformed along the way. Simo (This used to be commit 1e2c13b2d52de7c534493dd79a2c0596a3e8c1f5)
Diffstat (limited to 'source4/libcli/ldap/ldap_client.c')
-rw-r--r--source4/libcli/ldap/ldap_client.c34
1 files changed, 17 insertions, 17 deletions
diff --git a/source4/libcli/ldap/ldap_client.c b/source4/libcli/ldap/ldap_client.c
index 9103e939e7..364961cf47 100644
--- a/source4/libcli/ldap/ldap_client.c
+++ b/source4/libcli/ldap/ldap_client.c
@@ -90,9 +90,9 @@ static void ldap_connection_dead(struct ldap_connection *conn)
/*
handle packet errors
*/
-static void ldap_error_handler(void *private, NTSTATUS status)
+static void ldap_error_handler(void *private_data, NTSTATUS status)
{
- struct ldap_connection *conn = talloc_get_type(private,
+ struct ldap_connection *conn = talloc_get_type(private_data,
struct ldap_connection);
ldap_connection_dead(conn);
}
@@ -155,14 +155,14 @@ static void ldap_match_message(struct ldap_connection *conn, struct ldap_message
check if a blob is a complete ldap packet
handle wrapper or unwrapped connections
*/
-NTSTATUS ldap_complete_packet(void *private, DATA_BLOB blob, size_t *size)
+NTSTATUS ldap_complete_packet(void *private_data, DATA_BLOB blob, size_t *size)
{
- struct ldap_connection *conn = talloc_get_type(private,
+ struct ldap_connection *conn = talloc_get_type(private_data,
struct ldap_connection);
if (conn->enable_wrap) {
- return packet_full_request_u32(private, blob, size);
+ return packet_full_request_u32(private_data, blob, size);
}
- return ldap_full_packet(private, blob, size);
+ return ldap_full_packet(private_data, blob, size);
}
/*
@@ -234,9 +234,9 @@ static NTSTATUS ldap_decode_wrapped(struct ldap_connection *conn, DATA_BLOB blob
/*
handle ldap recv events
*/
-static NTSTATUS ldap_recv_handler(void *private, DATA_BLOB blob)
+static NTSTATUS ldap_recv_handler(void *private_data, DATA_BLOB blob)
{
- struct ldap_connection *conn = talloc_get_type(private,
+ struct ldap_connection *conn = talloc_get_type(private_data,
struct ldap_connection);
if (conn->enable_wrap) {
return ldap_decode_wrapped(conn, blob);
@@ -250,9 +250,9 @@ static NTSTATUS ldap_recv_handler(void *private, DATA_BLOB blob)
handle ldap socket events
*/
static void ldap_io_handler(struct event_context *ev, struct fd_event *fde,
- uint16_t flags, void *private)
+ uint16_t flags, void *private_data)
{
- struct ldap_connection *conn = talloc_get_type(private,
+ struct ldap_connection *conn = talloc_get_type(private_data,
struct ldap_connection);
if (flags & EVENT_FD_WRITE) {
packet_queue_run(conn->packet);
@@ -433,9 +433,9 @@ static int ldap_request_destructor(void *ptr)
called on timeout of a ldap request
*/
static void ldap_request_timeout(struct event_context *ev, struct timed_event *te,
- struct timeval t, void *private)
+ struct timeval t, void *private_data)
{
- struct ldap_request *req = talloc_get_type(private, struct ldap_request);
+ struct ldap_request *req = talloc_get_type(private_data, struct ldap_request);
req->status = NT_STATUS_IO_TIMEOUT;
if (req->state == LDAP_REQUEST_PENDING) {
DLIST_REMOVE(req->conn->pending, req);
@@ -451,9 +451,9 @@ static void ldap_request_timeout(struct event_context *ev, struct timed_event *t
called on completion of a one-way ldap request
*/
static void ldap_request_complete(struct event_context *ev, struct timed_event *te,
- struct timeval t, void *private)
+ struct timeval t, void *private_data)
{
- struct ldap_request *req = talloc_get_type(private, struct ldap_request);
+ struct ldap_request *req = talloc_get_type(private_data, struct ldap_request);
if (req->async.fn) {
req->async.fn(req);
}
@@ -534,9 +534,9 @@ struct ldap_request *ldap_request_send(struct ldap_connection *conn,
DLIST_ADD(conn->pending, req);
/* put a timeout on the request */
- event_add_timed(conn->event.event_ctx, req,
- timeval_current_ofs(conn->timeout, 0),
- ldap_request_timeout, req);
+ req->time_event = event_add_timed(conn->event.event_ctx, req,
+ timeval_current_ofs(conn->timeout, 0),
+ ldap_request_timeout, req);
return req;