mirror of
https://github.com/samba-team/samba.git
synced 2025-02-28 01:58:17 +03:00
s3-spoolss: remove old rpccli_spoolss_enumprinterdataex.
Guenther
This commit is contained in:
parent
f9712d568a
commit
9d024d1715
@ -5550,9 +5550,6 @@ WERROR rpccli_spoolss_enumprinterdataex(struct rpc_pipe_client *cli,
|
||||
uint32_t offered,
|
||||
uint32_t *count,
|
||||
struct spoolss_PrinterEnumValues **info);
|
||||
WERROR rpccli_spoolss_enumprinterdataex(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx,
|
||||
POLICY_HND *hnd, const char *keyname,
|
||||
REGVAL_CTR *ctr);
|
||||
|
||||
/* The following definitions come from rpc_client/init_spoolss.c */
|
||||
|
||||
@ -5834,9 +5831,6 @@ bool sec_io_desc_buf(const char *desc, SEC_DESC_BUF **ppsdb, prs_struct *ps, int
|
||||
|
||||
uint32 spoolss_size_printer_enum_values(PRINTER_ENUM_VALUES *p);
|
||||
bool make_spoolss_buffer5(TALLOC_CTX *mem_ctx, BUFFER5 *buf5, uint32 len, uint16 *src);
|
||||
bool make_spoolss_q_enumprinterdataex(SPOOL_Q_ENUMPRINTERDATAEX *q_u,
|
||||
const POLICY_HND *hnd, const char *key,
|
||||
uint32 size);
|
||||
bool spoolss_io_q_enumprinterdataex(const char *desc, SPOOL_Q_ENUMPRINTERDATAEX *q_u, prs_struct *ps, int depth);
|
||||
bool spoolss_io_r_enumprinterdataex(const char *desc, SPOOL_R_ENUMPRINTERDATAEX *r_u, prs_struct *ps, int depth);
|
||||
|
||||
|
@ -824,67 +824,3 @@ WERROR rpccli_spoolss_enumprinterdataex(struct rpc_pipe_client *cli,
|
||||
|
||||
return werror;
|
||||
}
|
||||
|
||||
|
||||
/*********************************************************************
|
||||
Decode various spoolss rpc's and info levels
|
||||
********************************************************************/
|
||||
|
||||
/**********************************************************************
|
||||
**********************************************************************/
|
||||
|
||||
WERROR rpccli_spoolss_enumprinterdataex(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx,
|
||||
POLICY_HND *hnd, const char *keyname,
|
||||
REGVAL_CTR *ctr)
|
||||
{
|
||||
prs_struct qbuf, rbuf;
|
||||
SPOOL_Q_ENUMPRINTERDATAEX in;
|
||||
SPOOL_R_ENUMPRINTERDATAEX out;
|
||||
int i;
|
||||
uint32 offered;
|
||||
|
||||
ZERO_STRUCT(in);
|
||||
ZERO_STRUCT(out);
|
||||
|
||||
offered = 0;
|
||||
make_spoolss_q_enumprinterdataex( &in, hnd, keyname, offered );
|
||||
|
||||
CLI_DO_RPC_WERR( cli, mem_ctx, &syntax_spoolss, SPOOLSS_ENUMPRINTERDATAEX,
|
||||
in, out,
|
||||
qbuf, rbuf,
|
||||
spoolss_io_q_enumprinterdataex,
|
||||
spoolss_io_r_enumprinterdataex,
|
||||
WERR_GENERAL_FAILURE );
|
||||
|
||||
if ( W_ERROR_EQUAL( out.status, WERR_MORE_DATA ) ) {
|
||||
offered = out.needed;
|
||||
|
||||
ZERO_STRUCT(in);
|
||||
ZERO_STRUCT(out);
|
||||
|
||||
make_spoolss_q_enumprinterdataex( &in, hnd, keyname, offered );
|
||||
|
||||
CLI_DO_RPC_WERR( cli, mem_ctx, &syntax_spoolss, SPOOLSS_ENUMPRINTERDATAEX,
|
||||
in, out,
|
||||
qbuf, rbuf,
|
||||
spoolss_io_q_enumprinterdataex,
|
||||
spoolss_io_r_enumprinterdataex,
|
||||
WERR_GENERAL_FAILURE );
|
||||
}
|
||||
|
||||
if (!W_ERROR_IS_OK(out.status))
|
||||
return out.status;
|
||||
|
||||
for (i = 0; i < out.returned; i++) {
|
||||
PRINTER_ENUM_VALUES *v = &out.ctr.values[i];
|
||||
fstring name;
|
||||
|
||||
rpcstr_pull(name, v->valuename.buffer, sizeof(name), -1,
|
||||
STR_TERMINATE);
|
||||
regval_ctr_addvalue(ctr, name, v->type, (const char *)v->data, v->data_len);
|
||||
}
|
||||
|
||||
return out.status;
|
||||
}
|
||||
|
||||
/** @} **/
|
||||
|
Loading…
x
Reference in New Issue
Block a user