mirror of
https://github.com/samba-team/samba.git
synced 2024-12-31 17:18:04 +03:00
r17272: move the callback stuff into a substructure
metze
This commit is contained in:
parent
5b26cbc342
commit
c49e27d5d0
@ -909,8 +909,10 @@ struct gensec_update_request {
|
|||||||
DATA_BLOB in;
|
DATA_BLOB in;
|
||||||
DATA_BLOB out;
|
DATA_BLOB out;
|
||||||
NTSTATUS status;
|
NTSTATUS status;
|
||||||
void (*callback)(struct gensec_update_request *req, void *private_data);
|
struct {
|
||||||
|
void (*fn)(struct gensec_update_request *req, void *private_data);
|
||||||
void *private_data;
|
void *private_data;
|
||||||
|
} callback;
|
||||||
};
|
};
|
||||||
|
|
||||||
static void gensec_update_async_timed_handler(struct event_context *ev, struct timed_event *te,
|
static void gensec_update_async_timed_handler(struct event_context *ev, struct timed_event *te,
|
||||||
@ -918,7 +920,7 @@ static void gensec_update_async_timed_handler(struct event_context *ev, struct t
|
|||||||
{
|
{
|
||||||
struct gensec_update_request *req = talloc_get_type(ptr, struct gensec_update_request);
|
struct gensec_update_request *req = talloc_get_type(ptr, struct gensec_update_request);
|
||||||
req->status = req->gensec_security->ops->update(req->gensec_security, req, req->in, &req->out);
|
req->status = req->gensec_security->ops->update(req->gensec_security, req, req->in, &req->out);
|
||||||
req->callback(req, req->private_data);
|
req->callback.fn(req, req->callback.private_data);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -943,8 +945,8 @@ _PUBLIC_ void gensec_update_send(struct gensec_security *gensec_security, const
|
|||||||
req->gensec_security = gensec_security;
|
req->gensec_security = gensec_security;
|
||||||
req->in = in;
|
req->in = in;
|
||||||
req->out = data_blob(NULL, 0);
|
req->out = data_blob(NULL, 0);
|
||||||
req->callback = callback;
|
req->callback.fn = callback;
|
||||||
req->private_data = private_data;
|
req->callback.private_data = private_data;
|
||||||
|
|
||||||
te = event_add_timed(gensec_security->event_ctx, req,
|
te = event_add_timed(gensec_security->event_ctx, req,
|
||||||
timeval_zero(),
|
timeval_zero(),
|
||||||
|
Loading…
Reference in New Issue
Block a user