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:28:10 +0000 (12:28 +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 6312c40515c437b77a1a26df98af30c818d837e5..6274b20c49d3a7d12b354dfe0ba5627377936e8a 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 2df406318c3d8c483204b9506c0a3c42941ef4c8..523d7e8c984addfff92adbab4a835e06a31372b0 100644 (file)
@@ -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;
 }