libndr: add LIBNDR_FLAG_NO_RELATIVE_REVERSE so that relative reverse processing can...
authorGünther Deschner <gd@samba.org>
Tue, 9 Feb 2010 17:27:37 +0000 (18:27 +0100)
committerKarolin Seeger <kseeger@samba.org>
Fri, 19 Feb 2010 11:30:23 +0000 (12:30 +0100)
Guenther
(cherry picked from commit a2c34296fa6ca2ffb69cb69698a9b5f81803e8a8)

librpc/idl/idl_types.h
librpc/ndr/libndr.h
librpc/ndr/ndr.c

index 193a1f612f15c45a29e99345f6982ed1a4785512..3c6c12cd846a6c0563b01f9dd418f68402eec0a4 100644 (file)
@@ -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
index bd97e4c64dd9e366dad5021dcb348ad58c996b67..27aeec52e213f0ac50b5f01ec2bd932bbf79543d 100644 (file)
@@ -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)
 
index 521d4ec8d2516a7b1e634add45d63272e73002ab..c3759985e83e665d4cf06f1da2fb7d19a3093b04 100644 (file)
@@ -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;
 }