diff options
author | Günther Deschner <gd@samba.org> | 2010-02-09 18:27:37 +0100 |
---|---|---|
committer | Karolin Seeger <kseeger@samba.org> | 2010-02-22 15:50:37 +0100 |
commit | dec87d05b2f3257a8c016d67de4fbeb2d93f93b5 (patch) | |
tree | 77a8b596c652eabe4f67815394ff519c25a6ddb5 | |
parent | f587a0f182ff560be506d0f1d284cd8a712a10a9 (diff) | |
download | samba-dec87d05b2f3257a8c016d67de4fbeb2d93f93b5.tar.gz samba-dec87d05b2f3257a8c016d67de4fbeb2d93f93b5.tar.xz samba-dec87d05b2f3257a8c016d67de4fbeb2d93f93b5.zip |
libndr: add LIBNDR_FLAG_NO_RELATIVE_REVERSE so that relative reverse processing can be disabled for single structure elements.
Guenther
(cherry picked from commit a2c34296fa6ca2ffb69cb69698a9b5f81803e8a8)
(cherry picked from commit a026311c81bc8d7f154dad96b77c6121432384a3)
-rw-r--r-- | librpc/idl/idl_types.h | 1 | ||||
-rw-r--r-- | librpc/ndr/libndr.h | 3 | ||||
-rw-r--r-- | librpc/ndr/ndr.c | 3 |
3 files changed, 7 insertions, 0 deletions
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 bd97e4c64dd..27aeec52e21 100644 --- a/librpc/ndr/libndr.h +++ b/librpc/ndr/libndr.h @@ -123,6 +123,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 521d4ec8d25..c3759985e83 100644 --- a/librpc/ndr/ndr.c +++ b/librpc/ndr/ndr.c @@ -349,6 +349,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; } |