From c455d07975bc5cc0370b1d6ab80247b0240a4e28 Mon Sep 17 00:00:00 2001 From: =?utf8?q?G=C3=BCnther=20Deschner?= Date: Mon, 9 Mar 2009 22:48:13 +0100 Subject: [PATCH] s3-spoolss: remove old enumprinters wrapper. Guenther (cherry picked from commit 16438e3a93e9f39d37b6144a1ccba80022bf0b07) (cherry picked from commit c440644e8941cd167c5a8df1e4d203df0679944d) --- source3/include/proto.h | 11 -- source3/rpc_client/cli_spoolss.c | 206 -------------------------------------- source3/rpc_parse/parse_spoolss.c | 25 ----- 3 files changed, 242 deletions(-) diff --git a/source3/include/proto.h b/source3/include/proto.h index 1cc9b5761a7..bc7152b383c 100644 --- a/source3/include/proto.h +++ b/source3/include/proto.h @@ -5534,9 +5534,6 @@ WERROR rpccli_spoolss_enumprinters(struct rpc_pipe_client *cli, uint32_t offered, uint32_t *count, union spoolss_PrinterInfo **info); -WERROR rpccli_spoolss_enum_printers(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, - char *name, uint32 flags, uint32 level, - uint32 *num_printers, PRINTER_INFO_CTR *ctr); WERROR rpccli_spoolss_getprinterdata(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, POLICY_HND *hnd, const char *valuename, REGISTRY_VALUE *value); @@ -5863,14 +5860,6 @@ uint32 spoolss_size_printer_info_3(PRINTER_INFO_3 *info); uint32 spoolss_size_printer_info_7(PRINTER_INFO_7 *info); uint32 spoolss_size_string_array(uint16 *string); uint32 spoolss_size_printer_enum_values(PRINTER_ENUM_VALUES *p); -bool make_spoolss_q_enumprinters( - SPOOL_Q_ENUMPRINTERS *q_u, - uint32 flags, - char *servername, - uint32 level, - RPC_BUFFER *buffer, - uint32 offered -); bool spoolss_io_q_enumprinters(const char *desc, SPOOL_Q_ENUMPRINTERS *q_u, prs_struct *ps, int depth); bool spoolss_io_r_enumprinters(const char *desc, SPOOL_R_ENUMPRINTERS *r_u, prs_struct *ps, int depth); bool spoolss_io_r_getprinter(const char *desc, SPOOL_R_GETPRINTER *r_u, prs_struct *ps, int depth); diff --git a/source3/rpc_client/cli_spoolss.c b/source3/rpc_client/cli_spoolss.c index 5467c6d7360..76614c67eb9 100644 --- a/source3/rpc_client/cli_spoolss.c +++ b/source3/rpc_client/cli_spoolss.c @@ -712,212 +712,6 @@ WERROR rpccli_spoolss_enumprinters(struct rpc_pipe_client *cli, /********************************************************************** **********************************************************************/ -static bool decode_printer_info_0(TALLOC_CTX *mem_ctx, RPC_BUFFER *buffer, - uint32 returned, PRINTER_INFO_0 **info) -{ - uint32 i; - PRINTER_INFO_0 *inf; - - if (returned) { - inf=TALLOC_ARRAY(mem_ctx, PRINTER_INFO_0, returned); - if (!inf) { - return False; - } - memset(inf, 0, returned*sizeof(PRINTER_INFO_0)); - } else { - inf = NULL; - } - - prs_set_offset(&buffer->prs,0); - - for (i=0; iprs,0); - - for (i=0; iprs,0); - - for (i=0; iprs,0); - - for (i=0; iprinters_0)) { - return WERR_GENERAL_FAILURE; - } - break; - case 1: - if (!decode_printer_info_1(mem_ctx, out.buffer, out.returned, &ctr->printers_1)) { - return WERR_GENERAL_FAILURE; - } - break; - case 2: - if (!decode_printer_info_2(mem_ctx, out.buffer, out.returned, &ctr->printers_2)) { - return WERR_GENERAL_FAILURE; - } - break; - case 3: - if (!decode_printer_info_3(mem_ctx, out.buffer, out.returned, &ctr->printers_3)) { - return WERR_GENERAL_FAILURE; - } - break; - default: - return WERR_UNKNOWN_LEVEL; - } - - *num_printers = out.returned; - - return out.status; -} - -/********************************************************************** -**********************************************************************/ - WERROR rpccli_spoolss_getprinterdata(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, POLICY_HND *hnd, const char *valuename, REGISTRY_VALUE *value) diff --git a/source3/rpc_parse/parse_spoolss.c b/source3/rpc_parse/parse_spoolss.c index d77199d6248..10d61ae6e98 100644 --- a/source3/rpc_parse/parse_spoolss.c +++ b/source3/rpc_parse/parse_spoolss.c @@ -1041,31 +1041,6 @@ uint32 spoolss_size_printer_enum_values(PRINTER_ENUM_VALUES *p) } /******************************************************************* - * init a structure. - ********************************************************************/ - -bool make_spoolss_q_enumprinters( - SPOOL_Q_ENUMPRINTERS *q_u, - uint32 flags, - char *servername, - uint32 level, - RPC_BUFFER *buffer, - uint32 offered -) -{ - q_u->flags=flags; - - q_u->servername_ptr = (servername != NULL) ? 1 : 0; - init_buf_unistr2(&q_u->servername, &q_u->servername_ptr, servername); - - q_u->level=level; - q_u->buffer=buffer; - q_u->offered=offered; - - return True; -} - -/******************************************************************* * read a structure. * called from spoolss_enumprinters (srv_spoolss.c) ********************************************************************/ -- 2.11.4.GIT