From 6df9e1f7aafe6da4b90271dda8d6cf3847a8d39e Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Mon, 16 Mar 2009 16:53:41 +0100 Subject: s3-spoolss: add push_spoolss_PrinterData(). Guenther --- source3/include/proto.h | 3 +++ source3/rpc_client/init_spoolss.c | 15 +++++++++++++++ source3/rpc_server/srv_spoolss_nt.c | 16 ---------------- 3 files changed, 18 insertions(+), 16 deletions(-) (limited to 'source3') diff --git a/source3/include/proto.h b/source3/include/proto.h index 615cb16649..f2929e8296 100644 --- a/source3/include/proto.h +++ b/source3/include/proto.h @@ -5558,6 +5558,9 @@ WERROR pull_spoolss_PrinterData(TALLOC_CTX *mem_ctx, const DATA_BLOB *blob, union spoolss_PrinterData *data, enum winreg_Type type); +WERROR push_spoolss_PrinterData(TALLOC_CTX *mem_ctx, DATA_BLOB *blob, + enum winreg_Type type, + union spoolss_PrinterData *data); /* The following definitions come from rpc_client/init_lsa.c */ diff --git a/source3/rpc_client/init_spoolss.c b/source3/rpc_client/init_spoolss.c index ddf0118429..4c105ea3bc 100644 --- a/source3/rpc_client/init_spoolss.c +++ b/source3/rpc_client/init_spoolss.c @@ -58,3 +58,18 @@ WERROR pull_spoolss_PrinterData(TALLOC_CTX *mem_ctx, return WERR_OK; } +/******************************************************************* + ********************************************************************/ + +WERROR push_spoolss_PrinterData(TALLOC_CTX *mem_ctx, DATA_BLOB *blob, + enum winreg_Type type, + union spoolss_PrinterData *data) +{ + enum ndr_err_code ndr_err; + ndr_err = ndr_push_union_blob(blob, mem_ctx, NULL, data, type, + (ndr_push_flags_fn_t)ndr_push_spoolss_PrinterData); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { + return WERR_GENERAL_FAILURE; + } + return WERR_OK; +} diff --git a/source3/rpc_server/srv_spoolss_nt.c b/source3/rpc_server/srv_spoolss_nt.c index 8ce0b28db0..950dc013b2 100644 --- a/source3/rpc_server/srv_spoolss_nt.c +++ b/source3/rpc_server/srv_spoolss_nt.c @@ -2461,22 +2461,6 @@ WERROR set_printer_dataex( NT_PRINTER_INFO_LEVEL *printer, const char *key, cons return add_printer_data( printer->info_2, key, value, type, data, real_len ); } -/******************************************************************* - ********************************************************************/ - -static WERROR push_spoolss_PrinterData(TALLOC_CTX *mem_ctx, DATA_BLOB *blob, - enum winreg_Type type, - union spoolss_PrinterData *data) -{ - enum ndr_err_code ndr_err; - ndr_err = ndr_push_union_blob(blob, mem_ctx, NULL, data, type, - (ndr_push_flags_fn_t)ndr_push_spoolss_PrinterData); - if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { - return WERR_GENERAL_FAILURE; - } - return WERR_OK; -} - /******************************************************************** GetPrinterData on a printer server Handle. ********************************************************************/ -- cgit