From 7643afa70e879efc059c75b8309bf89dbb3c459b Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Thu, 4 Mar 2010 15:46:28 +0100 Subject: s3-rpcclient: fix rpcclient after spoolss_GetPrinterData{Ex} IDL change. Guenther --- source3/rpc_client/cli_spoolss.c | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) (limited to 'source3/rpc_client') diff --git a/source3/rpc_client/cli_spoolss.c b/source3/rpc_client/cli_spoolss.c index d0781a0e65..2ca313d168 100644 --- a/source3/rpc_client/cli_spoolss.c +++ b/source3/rpc_client/cli_spoolss.c @@ -765,34 +765,44 @@ WERROR rpccli_spoolss_getprinterdata(struct rpc_pipe_client *cli, const char *value_name, uint32_t offered, enum winreg_Type *type, - union spoolss_PrinterData *data) + uint32_t *needed_p, + uint8_t **data_p) { NTSTATUS status; WERROR werror; uint32_t needed; + uint8_t *data; + + data = talloc_zero_array(mem_ctx, uint8_t, offered); + W_ERROR_HAVE_NO_MEMORY(data); status = rpccli_spoolss_GetPrinterData(cli, mem_ctx, handle, value_name, - offered, type, data, + offered, &needed, &werror); if (W_ERROR_EQUAL(werror, WERR_MORE_DATA)) { offered = needed; + data = talloc_zero_array(mem_ctx, uint8_t, offered); + W_ERROR_HAVE_NO_MEMORY(data); status = rpccli_spoolss_GetPrinterData(cli, mem_ctx, handle, value_name, - offered, type, data, + offered, &needed, &werror); } + *data_p = data; + *needed_p = needed; + return werror; } -- cgit