From 5f60855ba2eb822dcb867378ff09278c42931b89 Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Wed, 2 Dec 2009 14:25:31 +0100 Subject: samba-spoolss: use spoolss_StringArray2 in spoolss_EnumPrinterKey. This should finally resolve the endian issues we were seeing on sparc and is much cleaner for spoolss clients and servers. Guenther --- librpc/gen_ndr/cli_spoolss.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'librpc/gen_ndr/cli_spoolss.c') diff --git a/librpc/gen_ndr/cli_spoolss.c b/librpc/gen_ndr/cli_spoolss.c index aba70f2d2d..0a5c2a6eb7 100644 --- a/librpc/gen_ndr/cli_spoolss.c +++ b/librpc/gen_ndr/cli_spoolss.c @@ -12207,7 +12207,7 @@ struct tevent_req *rpccli_spoolss_EnumPrinterKey_send(TALLOC_CTX *mem_ctx, struct rpc_pipe_client *cli, struct policy_handle *_handle /* [in] [ref] */, const char *_key_name /* [in] [charset(UTF16)] */, - uint16_t *_key_buffer /* [out] [ref,size_is(offered/2)] */, + struct spoolss_StringArray2 *_key_buffer /* [out] [ref] */, uint32_t _offered /* [in] */, uint32_t *_needed /* [out] [ref] */) { @@ -12278,7 +12278,7 @@ static void rpccli_spoolss_EnumPrinterKey_done(struct tevent_req *subreq) } /* Copy out parameters */ - memcpy(state->orig.out.key_buffer, state->tmp.out.key_buffer, (state->tmp.in.offered / 2) * sizeof(*state->orig.out.key_buffer)); + *state->orig.out.key_buffer = *state->tmp.out.key_buffer; *state->orig.out.needed = *state->tmp.out.needed; /* Copy result */ @@ -12317,7 +12317,7 @@ NTSTATUS rpccli_spoolss_EnumPrinterKey(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle /* [in] [ref] */, const char *key_name /* [in] [charset(UTF16)] */, - uint16_t *key_buffer /* [out] [ref,size_is(offered/2)] */, + struct spoolss_StringArray2 *key_buffer /* [out] [ref] */, uint32_t offered /* [in] */, uint32_t *needed /* [out] [ref] */, WERROR *werror) @@ -12345,7 +12345,7 @@ NTSTATUS rpccli_spoolss_EnumPrinterKey(struct rpc_pipe_client *cli, } /* Return variables */ - memcpy(key_buffer, r.out.key_buffer, (r.in.offered / 2) * sizeof(*key_buffer)); + *key_buffer = *r.out.key_buffer; *needed = *r.out.needed; /* Return result */ -- cgit