From 292af4fc046ff39ebd3ec853c402dc267a863fa6 Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Wed, 2 Dec 2009 14:22:52 +0100 Subject: spoolss: add spoolss_StringArray2. The difference to spoolss_StringArray is that in spoolss_StringArray2 the string array is put into a subcontext of _ndr_size. Guenther --- librpc/ndr/ndr_spoolss_buf.c | 9 +++++++++ librpc/ndr/ndr_spoolss_buf.h | 1 + 2 files changed, 10 insertions(+) (limited to 'librpc/ndr') diff --git a/librpc/ndr/ndr_spoolss_buf.c b/librpc/ndr/ndr_spoolss_buf.c index 0acae3dedb..9968e90c6a 100644 --- a/librpc/ndr/ndr_spoolss_buf.c +++ b/librpc/ndr/ndr_spoolss_buf.c @@ -708,6 +708,15 @@ _PUBLIC_ size_t ndr_size_spoolss_StringArray(const struct spoolss_StringArray *r return ndr_size_struct(r, flags, (ndr_push_flags_fn_t)ndr_push_spoolss_StringArray, ic); } +_PUBLIC_ size_t ndr_size_spoolss_StringArray2(const struct spoolss_StringArray2 *r, struct smb_iconv_convenience *ic, int flags) +{ + if (!r) { + return 4; + } + + return ndr_size_struct((const struct spoolss_StringArray *)r, flags, (ndr_push_flags_fn_t)ndr_push_spoolss_StringArray, ic); +} + /* hand marshall as pidl cannot (yet) generate a relative pointer to a fixed array of * structs */ diff --git a/librpc/ndr/ndr_spoolss_buf.h b/librpc/ndr/ndr_spoolss_buf.h index aa6e277c5f..9a76f824f0 100644 --- a/librpc/ndr/ndr_spoolss_buf.h +++ b/librpc/ndr/ndr_spoolss_buf.h @@ -47,6 +47,7 @@ enum ndr_err_code ndr_pull_spoolss_GetPrinterData(struct ndr_pull *ndr, int flag enum ndr_err_code ndr_push_spoolss_SetPrinterData(struct ndr_push *ndr, int flags, const struct spoolss_SetPrinterData *r); uint32_t _ndr_size_spoolss_DeviceMode(struct spoolss_DeviceMode *devmode, struct smb_iconv_convenience *ic, uint32_t flags); size_t ndr_size_spoolss_StringArray(const struct spoolss_StringArray *r, struct smb_iconv_convenience *ic, int flags); +size_t ndr_size_spoolss_StringArray2(const struct spoolss_StringArray2 *r, struct smb_iconv_convenience *ic, int flags); _PUBLIC_ enum ndr_err_code ndr_push_spoolss_DriverInfo101(struct ndr_push *ndr, int ndr_flags, const struct spoolss_DriverInfo101 *r); _PUBLIC_ enum ndr_err_code ndr_pull_spoolss_DriverInfo101(struct ndr_pull *ndr, int ndr_flags, struct spoolss_DriverInfo101 *r); void ndr_print_spoolss_Field(struct ndr_print *ndr, const char *name, const union spoolss_Field *r); -- cgit