summaryrefslogtreecommitdiff
path: root/source4/librpc/ndr/ndr.c
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2003-11-19 22:10:20 +0000
committerAndrew Tridgell <tridge@samba.org>2003-11-19 22:10:20 +0000
commit10ee36bede1337d73feec575cc840957090b30b2 (patch)
tree8d292361ad5e6bb1291fc3dbca191d1c44bd453b /source4/librpc/ndr/ndr.c
parent5a51af068533357fbf0ae4ddfd169fb752ddd2b5 (diff)
downloadsamba-10ee36bede1337d73feec575cc840957090b30b2.tar.gz
samba-10ee36bede1337d73feec575cc840957090b30b2.tar.bz2
samba-10ee36bede1337d73feec575cc840957090b30b2.zip
switched to a new way of handling unions, so that we can handle
alignment correctly for unions that have non-uint16 discriminants fixed the union handling in srvsvc.idl. (metze, please take a look at the changes, your IDL did match what was one the wire in most cases, but isn't the way IDL is usually coded) (This used to be commit 7b5d0287298e8505e0ec7b22d75d9f9a8a610031)
Diffstat (limited to 'source4/librpc/ndr/ndr.c')
-rw-r--r--source4/librpc/ndr/ndr.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/source4/librpc/ndr/ndr.c b/source4/librpc/ndr/ndr.c
index 0d40b32835..a78f135d92 100644
--- a/source4/librpc/ndr/ndr.c
+++ b/source4/librpc/ndr/ndr.c
@@ -318,9 +318,9 @@ void ndr_print_debug(void (*fn)(struct ndr_print *, const char *, void *),
/*
a useful helper function for printing idl unions via DEBUG()
*/
-void ndr_print_union_debug(void (*fn)(struct ndr_print *, const char *, uint16, void *),
+void ndr_print_union_debug(void (*fn)(struct ndr_print *, const char *, uint32, void *),
const char *name,
- uint16 level,
+ uint32 level,
void *ptr)
{
struct ndr_print ndr;
@@ -427,9 +427,9 @@ NTSTATUS ndr_pull_subcontext_flags_fn(struct ndr_pull *ndr,
}
NTSTATUS ndr_pull_subcontext_union_fn(struct ndr_pull *ndr,
- uint16 *level,
+ uint32 level,
void *base,
- NTSTATUS (*fn)(struct ndr_pull *, int , uint16 *, void *))
+ NTSTATUS (*fn)(struct ndr_pull *, int , uint32 , void *))
{
uint32 size;
struct ndr_pull ndr2;
@@ -562,15 +562,15 @@ NTSTATUS ndr_push_relative(struct ndr_push *ndr, int ndr_flags, const void *p,
/*
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 *))
+NTSTATUS ndr_pull_union_blob(DATA_BLOB *blob, TALLOC_CTX *mem_ctx, uint32 level, void *p,
+ NTSTATUS (*fn)(struct ndr_pull *, int ndr_flags, uint32, 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);
+ return fn(ndr, NDR_SCALARS|NDR_BUFFERS, level, p);
}
/*