diff options
author | Andrew Tridgell <tridge@samba.org> | 2003-11-16 11:36:59 +0000 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 2003-11-16 11:36:59 +0000 |
commit | ea266c0625e04a2dc10d25c2fee7b685965fcd3e (patch) | |
tree | 3db57fa36d79ab2df9adf6d7faa37f7d644b83b7 /source4/librpc/ndr/ndr.c | |
parent | 0c5759a4b2615b9c57ee7de04275ced1fc7d19cb (diff) | |
download | samba-ea266c0625e04a2dc10d25c2fee7b685965fcd3e.tar.gz samba-ea266c0625e04a2dc10d25c2fee7b685965fcd3e.tar.bz2 samba-ea266c0625e04a2dc10d25c2fee7b685965fcd3e.zip |
added support for level1 of EnumPrinters in spoolss. This uses a
number of "magic" add-ons to IDL to make it less painful, hopefully
this will make IDL generation useful for horrible systems like spoolss
(This used to be commit e18dba7d5a957ef82e8f91733a0bf95d579dcd7a)
Diffstat (limited to 'source4/librpc/ndr/ndr.c')
-rw-r--r-- | source4/librpc/ndr/ndr.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/source4/librpc/ndr/ndr.c b/source4/librpc/ndr/ndr.c index cd744ab778..25bfd20006 100644 --- a/source4/librpc/ndr/ndr.c +++ b/source4/librpc/ndr/ndr.c @@ -405,3 +405,17 @@ NTSTATUS ndr_pull_subcontext_flags_fn(struct ndr_pull *ndr, return NT_STATUS_OK; } +NTSTATUS ndr_pull_subcontext_union_fn(struct ndr_pull *ndr, + uint16 *level, + void *base, + NTSTATUS (*fn)(struct ndr_pull *, int , uint16 *, void *)) +{ + uint32 size; + struct ndr_pull ndr2; + + NDR_CHECK(ndr_pull_uint32(ndr, &size)); + NDR_CHECK(ndr_pull_subcontext(ndr, &ndr2, size)); + NDR_CHECK(fn(&ndr2, NDR_SCALARS|NDR_BUFFERS, level, base)); + NDR_CHECK(ndr_pull_advance(ndr, size)); + return NT_STATUS_OK; +} |