diff options
author | Stefan Metzmacher <metze@samba.org> | 2004-10-28 21:48:53 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 13:04:57 -0500 |
commit | 019719595778e0bd0a00781b33407554d1943985 (patch) | |
tree | dd54db0a15f72d5fe4a63a5104d120bcae735fba /source4/smb_server/search.c | |
parent | 94c0b939c4735866945aea8b7a0377be4d814125 (diff) | |
download | samba-019719595778e0bd0a00781b33407554d1943985.tar.gz samba-019719595778e0bd0a00781b33407554d1943985.tar.bz2 samba-019719595778e0bd0a00781b33407554d1943985.zip |
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)
Diffstat (limited to 'source4/smb_server/search.c')
-rw-r--r-- | source4/smb_server/search.c | 16 |
1 files changed, 8 insertions, 8 deletions
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; } |