summaryrefslogtreecommitdiff
path: root/source3/rpc_client
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2010-03-04 15:46:28 +0100
committerGünther Deschner <gd@samba.org>2010-03-05 15:18:00 +0100
commit7643afa70e879efc059c75b8309bf89dbb3c459b (patch)
tree363ed0f9b758593d877f662734389bc2eaada914 /source3/rpc_client
parentfbb6d00eed6bca960aa53a5967a2dea426cacfe2 (diff)
downloadsamba-7643afa70e879efc059c75b8309bf89dbb3c459b.tar.gz
samba-7643afa70e879efc059c75b8309bf89dbb3c459b.tar.bz2
samba-7643afa70e879efc059c75b8309bf89dbb3c459b.zip
s3-rpcclient: fix rpcclient after spoolss_GetPrinterData{Ex} IDL change.
Guenther
Diffstat (limited to 'source3/rpc_client')
-rw-r--r--source3/rpc_client/cli_spoolss.c16
1 files changed, 13 insertions, 3 deletions
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;
}