summaryrefslogtreecommitdiff
path: root/source4/rpc_server
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2006-06-26 18:31:39 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 14:09:32 -0500
commitb22ddfd61d5a3e477ea4401b3800d44709d56f82 (patch)
tree1099a6630d7c827cd154681566cfb1d7656c6b22 /source4/rpc_server
parent9b161bcb71d9a2faf91d9e45e8ecc1ad95e1abd2 (diff)
downloadsamba-b22ddfd61d5a3e477ea4401b3800d44709d56f82.tar.gz
samba-b22ddfd61d5a3e477ea4401b3800d44709d56f82.tar.bz2
samba-b22ddfd61d5a3e477ea4401b3800d44709d56f82.zip
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)
Diffstat (limited to 'source4/rpc_server')
-rw-r--r--source4/rpc_server/spoolss/dcesrv_spoolss.c37
1 files changed, 33 insertions, 4 deletions
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;
}