From cf40b9e3b53d92c585b4fb17d88c40d65d34a6a1 Mon Sep 17 00:00:00 2001 From: Sam Liddicott Date: Fri, 7 Nov 2008 15:39:57 +0000 Subject: [PATCH] Make the ntvfs_map_async_* functions public The ntvfs_map_async_* functions will be needed by the proxy code to recode rpc_structs as NDR over ntioctl --- source4/ntvfs/ntvfs.h | 18 +++++++++++++++++- source4/ntvfs/ntvfs_generic.c | 21 +++------------------ 2 files changed, 20 insertions(+), 19 deletions(-) diff --git a/source4/ntvfs/ntvfs.h b/source4/ntvfs/ntvfs.h index fc04d976f42..4987af73cb2 100644 --- a/source4/ntvfs/ntvfs.h +++ b/source4/ntvfs/ntvfs.h @@ -328,9 +328,25 @@ struct ntvfs_critical_sizes { .sizeof_ntvfs_request = sizeof(struct ntvfs_request), \ .sizeof_ntvfs_handle = sizeof(struct ntvfs_handle), \ .sizeof_ntvfs_handle_data = sizeof(struct ntvfs_handle_data), \ - } +} struct messaging_context; + +/* a second stage function converts from the out parameters of the generic + call onto the out parameters of the specific call made */ +typedef NTSTATUS (*second_stage_t)(struct ntvfs_module_context *, + struct ntvfs_request *, + void *, void *, NTSTATUS); + +/* + this structure holds the async state for pending mapped async calls +*/ +struct ntvfs_map_async { + struct ntvfs_module_context *ntvfs; + void *io, *io2; + second_stage_t fn; +}; + #include "librpc/gen_ndr/security.h" #include "librpc/gen_ndr/notify.h" #include "ntvfs/ntvfs_proto.h" diff --git a/source4/ntvfs/ntvfs_generic.c b/source4/ntvfs/ntvfs_generic.c index 554d5c5aef0..be87c1d505d 100644 --- a/source4/ntvfs/ntvfs_generic.c +++ b/source4/ntvfs/ntvfs_generic.c @@ -35,26 +35,11 @@ #include "libcli/smb2/smb2.h" #include "libcli/smb2/smb2_calls.h" -/* a second stage function converts from the out parameters of the generic - call onto the out parameters of the specific call made */ -typedef NTSTATUS (*second_stage_t)(struct ntvfs_module_context *, - struct ntvfs_request *, - void *, void *, NTSTATUS); - -/* - this structure holds the async state for pending mapped async calls -*/ -struct ntvfs_map_async { - struct ntvfs_module_context *ntvfs; - void *io, *io2; - second_stage_t fn; -}; - /* this is a async wrapper, called from the backend when it has completed a function that it has decided to reply to in an async fashion */ -static void ntvfs_map_async_send(struct ntvfs_request *req) +_PUBLIC_ void ntvfs_map_async_send(struct ntvfs_request *req) { struct ntvfs_map_async *m = req->async_states->private_data; @@ -73,7 +58,7 @@ static void ntvfs_map_async_send(struct ntvfs_request *req) io2 is the new call structure for the mapped call fn is a second stage function for processing the out arguments */ -static NTSTATUS ntvfs_map_async_setup(struct ntvfs_module_context *ntvfs, +_PUBLIC_ NTSTATUS ntvfs_map_async_setup(struct ntvfs_module_context *ntvfs, struct ntvfs_request *req, void *io, void *io2, second_stage_t fn) @@ -93,7 +78,7 @@ static NTSTATUS ntvfs_map_async_setup(struct ntvfs_module_context *ntvfs, /* called when first stage processing is complete. */ -static NTSTATUS ntvfs_map_async_finish(struct ntvfs_request *req, NTSTATUS status) +_PUBLIC_ NTSTATUS ntvfs_map_async_finish(struct ntvfs_request *req, NTSTATUS status) { struct ntvfs_map_async *m; -- 2.11.4.GIT