From b22ddfd61d5a3e477ea4401b3800d44709d56f82 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Mon, 26 Jun 2006 18:31:39 +0000 Subject: r16523: pass spoolss_XcvData calls to the ntptr backends... I wrote this code last year and found it in a working tree... metze (This used to be commit 9a685c5beff6936d354d541e875899d33b735ba9) --- source4/rpc_server/spoolss/dcesrv_spoolss.c | 37 +++++++++++++++++++++++++---- 1 file changed, 33 insertions(+), 4 deletions(-) (limited to 'source4/rpc_server/spoolss') diff --git a/source4/rpc_server/spoolss/dcesrv_spoolss.c b/source4/rpc_server/spoolss/dcesrv_spoolss.c index 9ff2bcf635..7c821032ab 100644 --- a/source4/rpc_server/spoolss/dcesrv_spoolss.c +++ b/source4/rpc_server/spoolss/dcesrv_spoolss.c @@ -1379,12 +1379,41 @@ static WERROR spoolss_57(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx /* - spoolss_58 + spoolss_XcvData */ -static WERROR spoolss_58(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx, - struct spoolss_58 *r) +static WERROR spoolss_XcvData(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx, + struct spoolss_XcvData *r) { - DCESRV_FAULT(DCERPC_FAULT_OP_RNG_ERROR); + struct ntptr_GenericHandle *handle; + struct dcesrv_handle *h; + WERROR status; + + DCESRV_PULL_HANDLE_WERR(h, r->in.handle, DCESRV_HANDLE_ANY); + handle = talloc_get_type(h->data, struct ntptr_GenericHandle); + + switch (handle->type) { + case NTPTR_HANDLE_SERVER: + status = ntptr_XcvDataPrintServer(handle, mem_ctx, r); + W_ERROR_NOT_OK_RETURN(status); + break; + case NTPTR_HANDLE_PRINTER: + status = ntptr_XcvDataPrinter(handle, mem_ctx, r); + W_ERROR_NOT_OK_RETURN(status); + break; + case NTPTR_HANDLE_PORT: + status = ntptr_XcvDataPort(handle, mem_ctx, r); + W_ERROR_NOT_OK_RETURN(status); + break; + case NTPTR_HANDLE_MONITOR: + status = ntptr_XcvDataMonitor(handle, mem_ctx, r); + W_ERROR_NOT_OK_RETURN(status); + break; + default: + return WERR_FOOBAR; + } + + /* TODO: handle the buffer sizes here! */ + return WERR_OK; } -- cgit