summaryrefslogtreecommitdiffstats
path: root/librpc
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2011-03-01 17:41:27 +0100
committerStefan Metzmacher <metze@samba.org>2011-03-02 13:13:02 +0100
commit56df34a6aa336c1f7e6b40a4cc585ae12d9052a6 (patch)
tree204bddc39682f9861c0e7ff62149f1a87ecf1c82 /librpc
parentea29261186a7a65e73d84802a607315a50050614 (diff)
downloadsamba-56df34a6aa336c1f7e6b40a4cc585ae12d9052a6.tar.gz
samba-56df34a6aa336c1f7e6b40a4cc585ae12d9052a6.tar.xz
samba-56df34a6aa336c1f7e6b40a4cc585ae12d9052a6.zip
librpc/rpc: let ndr_pull_spoolss_EnumPrinterDataEx() use a subcontext
This is not strictly needed, but it's good to have the logic in common with the other Enum* calls. This also allows us to play with the NDR_RELATIVE_REVERSE flag. metze
Diffstat (limited to 'librpc')
-rw-r--r--librpc/ndr/ndr_spoolss_buf.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/librpc/ndr/ndr_spoolss_buf.c b/librpc/ndr/ndr_spoolss_buf.c
index d1e4b41570..14fb222f4a 100644
--- a/librpc/ndr/ndr_spoolss_buf.c
+++ b/librpc/ndr/ndr_spoolss_buf.c
@@ -480,13 +480,16 @@ enum ndr_err_code ndr_push_spoolss_EnumPrinterDataEx(struct ndr_push *ndr, int f
_r.out.result = r->out.result;
_r.out.info = data_blob(NULL, 0);
if (r->in.offered >= *r->out.needed) {
+ struct ndr_push *_subndr_info;
struct __spoolss_EnumPrinterDataEx __r;
_ndr_info = ndr_push_init_ctx(ndr);
NDR_ERR_HAVE_NO_MEMORY(_ndr_info);
_ndr_info->flags= ndr->flags;
__r.in.count = *r->out.count;
__r.out.info = *r->out.info;
- NDR_CHECK(ndr_push___spoolss_EnumPrinterDataEx(_ndr_info, flags, &__r));
+ NDR_CHECK(ndr_push_subcontext_start(_ndr_info, &_subndr_info, 0, r->in.offered));
+ NDR_CHECK(ndr_push___spoolss_EnumPrinterDataEx(_subndr_info, flags, &__r));
+ NDR_CHECK(ndr_push_subcontext_end(_ndr_info, _subndr_info, 0, r->in.offered));
if (r->in.offered > _ndr_info->offset) {
uint32_t _padding_len = r->in.offered - _ndr_info->offset;
NDR_CHECK(ndr_push_zero(_ndr_info, _padding_len));