diff options
author | Stefan Metzmacher <metze@samba.org> | 2006-07-27 12:59:41 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 14:10:26 -0500 |
commit | de4c2bbc6cb734a59f19b1be06251059111944b0 (patch) | |
tree | 3477d70c0f5dc600a97caadb0822cf97579c205b /source4/auth/gensec | |
parent | e8623667d32f717b0b746e5041500bd0ee6b3ae8 (diff) | |
download | samba-de4c2bbc6cb734a59f19b1be06251059111944b0.tar.gz samba-de4c2bbc6cb734a59f19b1be06251059111944b0.tar.bz2 samba-de4c2bbc6cb734a59f19b1be06251059111944b0.zip |
r17272: move the callback stuff into a substructure
metze
(This used to be commit c49e27d5d0289e3525f7f6197b031e7d300df81b)
Diffstat (limited to 'source4/auth/gensec')
-rw-r--r-- | source4/auth/gensec/gensec.c | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/source4/auth/gensec/gensec.c b/source4/auth/gensec/gensec.c index 531c30005b..c0aba3924c 100644 --- a/source4/auth/gensec/gensec.c +++ b/source4/auth/gensec/gensec.c @@ -909,8 +909,10 @@ struct gensec_update_request { DATA_BLOB in; DATA_BLOB out; NTSTATUS status; - void (*callback)(struct gensec_update_request *req, void *private_data); - void *private_data; + struct { + void (*fn)(struct gensec_update_request *req, void *private_data); + void *private_data; + } callback; }; 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); 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); } /** @@ -940,11 +942,11 @@ _PUBLIC_ void gensec_update_send(struct gensec_security *gensec_security, const req = talloc(gensec_security, struct gensec_update_request); if (!req) goto failed; - req->gensec_security = gensec_security; - req->in = in; - req->out = data_blob(NULL, 0); - req->callback = callback; - req->private_data = private_data; + req->gensec_security = gensec_security; + req->in = in; + req->out = data_blob(NULL, 0); + req->callback.fn = callback; + req->callback.private_data = private_data; te = event_add_timed(gensec_security->event_ctx, req, timeval_zero(), |