From bb75710d40e11f127270e2d39c957db64da63a60 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Sat, 30 Dec 2006 10:42:01 +0000 Subject: r20417: - fix pushing of drsuapi_DsAttributeValueDataBlob - make drsuapi_DsReplicaAttribute public so that the ndr_print_* function can be used from the outside metze (This used to be commit f12776b9a9de55d5c67335d5e59c0d83a74ac939) --- source4/librpc/idl/drsuapi.idl | 4 ++-- source4/librpc/ndr/ndr_basic.c | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) (limited to 'source4') diff --git a/source4/librpc/idl/drsuapi.idl b/source4/librpc/idl/drsuapi.idl index 4b78d848ed..758e5f80fe 100644 --- a/source4/librpc/idl/drsuapi.idl +++ b/source4/librpc/idl/drsuapi.idl @@ -436,7 +436,7 @@ interface drsuapi /* Generic DATA_BLOB values */ typedef struct { - [range(0,10485760)] uint32 length; + [range(0,10485760),value(ndr_size_DATA_BLOB(0,r->data,0))] uint32 length; DATA_BLOB *data; } drsuapi_DsAttributeValueDataBlob; @@ -600,7 +600,7 @@ interface drsuapi [default] drsuapi_DsAttributeValueCtrDataBlob data_blob; } drsuapi_DsReplicaAttributeValueCtr; - typedef struct { + typedef [public] struct { drsuapi_DsAttributeId attid; [switch_is(attid)] drsuapi_DsReplicaAttributeValueCtr value_ctr; } drsuapi_DsReplicaAttribute; diff --git a/source4/librpc/ndr/ndr_basic.c b/source4/librpc/ndr/ndr_basic.c index a9cfb558f7..04589d3e96 100644 --- a/source4/librpc/ndr/ndr_basic.c +++ b/source4/librpc/ndr/ndr_basic.c @@ -846,5 +846,6 @@ _PUBLIC_ NTSTATUS ndr_pull_DATA_BLOB(struct ndr_pull *ndr, int ndr_flags, DATA_B _PUBLIC_ uint32_t ndr_size_DATA_BLOB(int ret, const DATA_BLOB *data, int flags) { + if (!data) return ret; return ret + data->length; } -- cgit