summaryrefslogtreecommitdiff
path: root/source3/lib/async_req.c
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2009-01-03 10:34:59 +0100
committerVolker Lendecke <vl@samba.org>2009-01-03 19:07:57 +0100
commit27abf6731ed472580157a0447e858e11f6f63f3b (patch)
tree2e5bbfb63813075ca2980b7d51fcd069031eaadb /source3/lib/async_req.c
parent141b76d747a0741cf9175529ec638f4625fcb099 (diff)
downloadsamba-27abf6731ed472580157a0447e858e11f6f63f3b.tar.gz
samba-27abf6731ed472580157a0447e858e11f6f63f3b.tar.bz2
samba-27abf6731ed472580157a0447e858e11f6f63f3b.zip
struct async_req doesn't really need to carry an event_context
Diffstat (limited to 'source3/lib/async_req.c')
-rw-r--r--source3/lib/async_req.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/source3/lib/async_req.c b/source3/lib/async_req.c
index 159666f15c..8c9b2e6b47 100644
--- a/source3/lib/async_req.c
+++ b/source3/lib/async_req.c
@@ -49,7 +49,7 @@ char *async_req_print(TALLOC_CTX *mem_ctx, struct async_req *req)
* The new async request will be initialized in state ASYNC_REQ_IN_PROGRESS
*/
-struct async_req *async_req_new(TALLOC_CTX *mem_ctx, struct event_context *ev)
+struct async_req *async_req_new(TALLOC_CTX *mem_ctx)
{
struct async_req *result;
@@ -58,7 +58,6 @@ struct async_req *async_req_new(TALLOC_CTX *mem_ctx, struct event_context *ev)
return NULL;
}
result->state = ASYNC_REQ_IN_PROGRESS;
- result->event_ctx = ev;
result->print = async_req_print;
return result;
}
@@ -135,12 +134,12 @@ static void async_trigger(struct event_context *ev, struct timed_event *te,
* conventions, independent of whether the request was actually deferred.
*/
-bool async_post_status(struct async_req *req, NTSTATUS status)
+bool async_post_status(struct async_req *req, struct event_context *ev,
+ NTSTATUS status)
{
req->status = status;
- if (event_add_timed(req->event_ctx, req, timeval_zero(),
- "async_trigger",
+ if (event_add_timed(ev, req, timeval_zero(), "async_trigger",
async_trigger, req) == NULL) {
return false;
}