summaryrefslogtreecommitdiff
path: root/source3/rpc_client/cli_spoolss.c
diff options
context:
space:
mode:
Diffstat (limited to 'source3/rpc_client/cli_spoolss.c')
-rw-r--r--source3/rpc_client/cli_spoolss.c134
1 files changed, 0 insertions, 134 deletions
diff --git a/source3/rpc_client/cli_spoolss.c b/source3/rpc_client/cli_spoolss.c
index 11537fc689..f2173faa93 100644
--- a/source3/rpc_client/cli_spoolss.c
+++ b/source3/rpc_client/cli_spoolss.c
@@ -572,68 +572,6 @@ static bool decode_printer_info_3(TALLOC_CTX *mem_ctx, RPC_BUFFER *buffer,
/**********************************************************************
**********************************************************************/
-static bool decode_port_info_1(TALLOC_CTX *mem_ctx, RPC_BUFFER *buffer,
- uint32 returned, PORT_INFO_1 **info)
-{
- uint32 i;
- PORT_INFO_1 *inf;
-
- if (returned) {
- inf=TALLOC_ARRAY(mem_ctx, PORT_INFO_1, returned);
- if (!inf) {
- return False;
- }
- memset(inf, 0, returned*sizeof(PORT_INFO_1));
- } else {
- inf = NULL;
- }
-
- prs_set_offset(&buffer->prs, 0);
-
- for (i=0; i<returned; i++) {
- if (!smb_io_port_info_1("", buffer, &(inf[i]), 0)) {
- return False;
- }
- }
-
- *info=inf;
- return True;
-}
-
-/**********************************************************************
-**********************************************************************/
-
-static bool decode_port_info_2(TALLOC_CTX *mem_ctx, RPC_BUFFER *buffer,
- uint32 returned, PORT_INFO_2 **info)
-{
- uint32 i;
- PORT_INFO_2 *inf;
-
- if (returned) {
- inf=TALLOC_ARRAY(mem_ctx, PORT_INFO_2, returned);
- if (!inf) {
- return False;
- }
- memset(inf, 0, returned*sizeof(PORT_INFO_2));
- } else {
- inf = NULL;
- }
-
- prs_set_offset(&buffer->prs, 0);
-
- for (i=0; i<returned; i++) {
- if (!smb_io_port_info_2("", buffer, &(inf[i]), 0)) {
- return False;
- }
- }
-
- *info=inf;
- return True;
-}
-
-/**********************************************************************
-**********************************************************************/
-
static bool decode_printer_driver_1(TALLOC_CTX *mem_ctx, RPC_BUFFER *buffer,
uint32 returned, DRIVER_INFO_1 **info)
{
@@ -860,78 +798,6 @@ WERROR rpccli_spoolss_enum_printers(struct rpc_pipe_client *cli, TALLOC_CTX *mem
/**********************************************************************
**********************************************************************/
-WERROR rpccli_spoolss_enum_ports(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx,
- uint32 level, uint32 *num_ports, PORT_INFO_CTR *ctr)
-{
- prs_struct qbuf, rbuf;
- SPOOL_Q_ENUMPORTS in;
- SPOOL_R_ENUMPORTS out;
- RPC_BUFFER buffer;
- fstring server;
- uint32 offered;
-
- ZERO_STRUCT(in);
- ZERO_STRUCT(out);
-
- slprintf(server, sizeof(fstring)-1, "\\\\%s", cli->desthost);
- strupper_m(server);
-
- offered = 0;
- if (!rpcbuf_init(&buffer, offered, mem_ctx))
- return WERR_NOMEM;
- make_spoolss_q_enumports( &in, server, level, &buffer, offered );
-
- CLI_DO_RPC_WERR( cli, mem_ctx, &syntax_spoolss, SPOOLSS_ENUMPORTS,
- in, out,
- qbuf, rbuf,
- spoolss_io_q_enumports,
- spoolss_io_r_enumports,
- WERR_GENERAL_FAILURE );
-
- if ( W_ERROR_EQUAL( out.status, WERR_INSUFFICIENT_BUFFER ) ) {
- offered = out.needed;
-
- ZERO_STRUCT(in);
- ZERO_STRUCT(out);
-
- if (!rpcbuf_init(&buffer, offered, mem_ctx))
- return WERR_NOMEM;
- make_spoolss_q_enumports( &in, server, level, &buffer, offered );
-
- CLI_DO_RPC_WERR( cli, mem_ctx, &syntax_spoolss, SPOOLSS_ENUMPORTS,
- in, out,
- qbuf, rbuf,
- spoolss_io_q_enumports,
- spoolss_io_r_enumports,
- WERR_GENERAL_FAILURE );
- }
-
- if ( !W_ERROR_IS_OK(out.status) )
- return out.status;
-
- switch (level) {
- case 1:
- if (!decode_port_info_1(mem_ctx, out.buffer, out.returned, &ctr->port.info_1)) {
- return WERR_GENERAL_FAILURE;
- }
- break;
- case 2:
- if (!decode_port_info_2(mem_ctx, out.buffer, out.returned, &ctr->port.info_2)) {
- return WERR_GENERAL_FAILURE;
- }
- break;
- default:
- return WERR_UNKNOWN_LEVEL;
- }
-
- *num_ports = out.returned;
-
- return out.status;
-}
-
-/**********************************************************************
-**********************************************************************/
-
WERROR rpccli_spoolss_enumprinterdrivers (struct rpc_pipe_client *cli,
TALLOC_CTX *mem_ctx,
uint32 level, const char *env,