From: Günther Deschner Date: Tue, 9 Feb 2010 17:27:37 +0000 (+0100) Subject: libndr: add LIBNDR_FLAG_NO_RELATIVE_REVERSE so that relative reverse processing X-Git-Url: http://git.samba.org/?p=abartlet%2Fsamba.git%2F.git;a=commitdiff_plain;h=a2c34296fa6ca2ffb69cb69698a9b5f81803e8a8 libndr: add LIBNDR_FLAG_NO_RELATIVE_REVERSE so that relative reverse processing can be disabled for single structure elements. Guenther --- diff --git a/librpc/idl/idl_types.h b/librpc/idl/idl_types.h index 193a1f612f1..3c6c12cd846 100644 --- a/librpc/idl/idl_types.h +++ b/librpc/idl/idl_types.h @@ -69,3 +69,4 @@ #define NDR_PAHEX LIBNDR_PRINT_ARRAY_HEX #define NDR_RELATIVE_REVERSE LIBNDR_FLAG_RELATIVE_REVERSE +#define NDR_NO_RELATIVE_REVERSE LIBNDR_FLAG_NO_RELATIVE_REVERSE diff --git a/librpc/ndr/libndr.h b/librpc/ndr/libndr.h index 39ae25f7e68..124c5f0d6e1 100644 --- a/librpc/ndr/libndr.h +++ b/librpc/ndr/libndr.h @@ -124,6 +124,9 @@ struct ndr_print { #define LIBNDR_FLAG_STR_UTF8 (1<<12) #define LIBNDR_STRING_FLAGS (0x7FFC) +/* set if relative pointers should *not* be marshalled in reverse order */ +#define LIBNDR_FLAG_NO_RELATIVE_REVERSE (1<<18) + /* set if relative pointers are marshalled in reverse order */ #define LIBNDR_FLAG_RELATIVE_REVERSE (1<<19) diff --git a/librpc/ndr/ndr.c b/librpc/ndr/ndr.c index 80025d71f07..4e584e102bf 100644 --- a/librpc/ndr/ndr.c +++ b/librpc/ndr/ndr.c @@ -367,6 +367,9 @@ _PUBLIC_ void ndr_set_flags(uint32_t *pflags, uint32_t new_flags) if (new_flags & LIBNDR_ALIGN_FLAGS) { (*pflags) &= ~LIBNDR_FLAG_REMAINING; } + if (new_flags & LIBNDR_FLAG_NO_RELATIVE_REVERSE) { + (*pflags) &= ~LIBNDR_FLAG_RELATIVE_REVERSE; + } (*pflags) |= new_flags; }