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)
committerStefan Metzmacher <metze@samba.org>
Thu, 18 Feb 2010 12:44:04 +0000 (13:44 +0100)
This is just a hack and we should let the callers use FLAG_ALIGN2
explicit in future.

metze

librpc/ndr/ndr.c

index 93fbb995f9c327cbdea2b6794603d389361031d8..61745aa55acabcb83f637efba36f95e3d0f91634 100644 (file)
@@ -1222,6 +1222,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) {