From 019719595778e0bd0a00781b33407554d1943985 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Thu, 28 Oct 2004 21:48:53 +0000 Subject: r3336: use a struct ntvfs_async_state to be able to do async chaning of ntvfs modules the idea is that a passthru module can use ntvfs_async_state_push() before calling ntvfs_next_*() and in the _send function it calls ntvfs_async_state_pop() and then call the upper layer send_fn itself - ntvfs_nbench is now fully async - the ntvfs_map_*() functions and the trans(2) mapping functions are not converted yet metze (This used to be commit fde64c0dc142b53d128c8ba09af048dc58d8ef3a) --- source4/smb_server/search.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'source4/smb_server/search.c') diff --git a/source4/smb_server/search.c b/source4/smb_server/search.c index fdfad5e182..b7b3d10ab6 100644 --- a/source4/smb_server/search.c +++ b/source4/smb_server/search.c @@ -26,8 +26,8 @@ /* check req->async.status and if not OK then send an error reply */ #define CHECK_ASYNC_STATUS do { \ - if (!NT_STATUS_IS_OK(req->async.status)) { \ - req_reply_error(req, req->async.status); \ + if (!NT_STATUS_IS_OK(req->async_states->status)) { \ + req_reply_error(req, req->async_states->status); \ return; \ }} while (0) @@ -37,8 +37,8 @@ immediately */ #define REQ_ASYNC_TAIL do { \ - if (!(req->control_flags & REQ_CONTROL_ASYNC)) { \ - req->async.send_fn(req); \ + if (!(req->async_states->state & NTVFS_ASYNC_STATE_ASYNC)) { \ + req->async_states->send_fn(req); \ }} while (0) /* useful wrapper for talloc with NO_MEMORY reply */ @@ -268,12 +268,12 @@ void reply_fclose(struct smbsrv_request *req) sc->fclose.in.id.client_cookie = IVAL(p, 17); /* do a search close operation */ - req->control_flags |= REQ_CONTROL_MAY_ASYNC; - req->async.send_fn = reply_fclose_send; - req->async.private = sc; + req->async_states->state |= NTVFS_ASYNC_STATE_MAY_ASYNC; + req->async_states->send_fn = reply_fclose_send; + req->async_states->private_data = sc; /* call backend */ - req->async.status = ntvfs_search_close(req, sc); + req->async_states->status = ntvfs_search_close(req, sc); REQ_ASYNC_TAIL; } -- cgit