diff options
author | Andrew Tridgell <tridge@samba.org> | 2003-11-17 04:56:59 +0000 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 2003-11-17 04:56:59 +0000 |
commit | d1feb4c6d56b37d045a329fab98857fb36bd42c1 (patch) | |
tree | c2f7b2022f3cda522104769de7b88c9bbe18ec38 /source4/librpc/ndr/ndr.c | |
parent | bf48b6e69a638dc78ab119424e27adc0ccc6c610 (diff) | |
download | samba-d1feb4c6d56b37d045a329fab98857fb36bd42c1.tar.gz samba-d1feb4c6d56b37d045a329fab98857fb36bd42c1.tar.bz2 samba-d1feb4c6d56b37d045a329fab98857fb36bd42c1.zip |
call OpenPrinterEx on each printer on the server, and then call
GetPrinter with all info levels on each printer
(This used to be commit 136b3cfc0460315e924c3d9c8328c1850fc21fba)
Diffstat (limited to 'source4/librpc/ndr/ndr.c')
-rw-r--r-- | source4/librpc/ndr/ndr.c | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/source4/librpc/ndr/ndr.c b/source4/librpc/ndr/ndr.c index 97eee70dfe..5f941c703d 100644 --- a/source4/librpc/ndr/ndr.c +++ b/source4/librpc/ndr/ndr.c @@ -533,3 +533,32 @@ NTSTATUS ndr_push_relative(struct ndr_push *ndr, int ndr_flags, const void *p, } return NT_STATUS_OK; } + + +/* + pull a union from a blob using NDR +*/ +NTSTATUS ndr_pull_union_blob(DATA_BLOB *blob, TALLOC_CTX *mem_ctx, uint16 level, void *p, + NTSTATUS (*fn)(struct ndr_pull *, int ndr_flags, uint16 *, void *)) +{ + struct ndr_pull *ndr; + ndr = ndr_pull_init_blob(blob, mem_ctx); + if (!ndr) { + return NT_STATUS_NO_MEMORY; + } + return fn(ndr, NDR_SCALARS|NDR_BUFFERS, &level, p); +} + +/* + pull a struct from a blob using NDR +*/ +NTSTATUS ndr_pull_struct_blob(DATA_BLOB *blob, TALLOC_CTX *mem_ctx, void *p, + NTSTATUS (*fn)(struct ndr_pull *, int ndr_flags, void *)) +{ + struct ndr_pull *ndr; + ndr = ndr_pull_init_blob(blob, mem_ctx); + if (!ndr) { + return NT_STATUS_NO_MEMORY; + } + return fn(ndr, NDR_SCALARS|NDR_BUFFERS, p); +} |