From d68d1558f7b6344a14774ce49ebc5da210a5b261 Mon Sep 17 00:00:00 2001 From: Tim Potter Date: Fri, 12 Dec 2003 06:26:34 +0000 Subject: Added routines for arrays of uint16s. (This used to be commit 370512f6644507ed0457de71ab5a50207e00e750) --- source4/librpc/ndr/ndr_basic.c | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) (limited to 'source4') diff --git a/source4/librpc/ndr/ndr_basic.c b/source4/librpc/ndr/ndr_basic.c index 0300bdd3fb..3b5aea60ca 100644 --- a/source4/librpc/ndr/ndr_basic.c +++ b/source4/librpc/ndr/ndr_basic.c @@ -278,6 +278,21 @@ NTSTATUS ndr_push_array_uint8(struct ndr_push *ndr, int ndr_flags, const char *d return ndr_push_bytes(ndr, data, n); } +/* + push an array of uint16 +*/ +NTSTATUS ndr_push_array_uint16(struct ndr_push *ndr, int ndr_flags, const uint16 *data, uint32 n) +{ + int i; + if (!(ndr_flags & NDR_SCALARS)) { + return NT_STATUS_OK; + } + for (i=0;idepth--; } +void ndr_print_array_uint16(struct ndr_print *ndr, const char *name, + const uint16 *data, uint32 count) +{ + int i; + + ndr->print(ndr, "%s: ARRAY(%d)", name, count); + ndr->depth++; + for (i=0;idepth--; +} + void ndr_print_array_uint8(struct ndr_print *ndr, const char *name, const uint8 *data, uint32 count) { -- cgit