]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
libndr: for now align reverse relative pointers to 2 bytes by default.
authorStefan Metzmacher <metze@samba.org>
Thu, 18 Feb 2010 12:40:44 +0000 (13:40 +0100)
committerKarolin Seeger <kseeger@samba.org>
Fri, 19 Feb 2010 11:30:24 +0000 (12:30 +0100)
This is just a hack and we should let the callers use FLAG_ALIGN2
explicit in future.

metze
(cherry picked from commit 4a76d29374769ba4c075b8d5767498848d2e17d6)

librpc/ndr/ndr.c

index 05d6ccebb2939daad75425ea5d9fa46ba146d06f..f1ff5971afcabdf6b02967ad6b908930aab479ef 100644 (file)
@@ -1140,6 +1140,9 @@ _PUBLIC_ enum ndr_err_code ndr_push_relative_ptr2_end(struct ndr_push *ndr, cons
        /* the reversed offset is at the end of the main buffer */
        correct_offset = ndr->relative_end_offset - len;
 
+       /* TODO: remove this hack and let the idl use FLAG_ALIGN2 explicit */
+       align = 2;
+
        if (ndr->flags & LIBNDR_FLAG_ALIGN2) {
                align = 2;
        } else if (ndr->flags & LIBNDR_FLAG_ALIGN4) {