diff options
author | Stefan Metzmacher <metze@samba.org> | 2010-02-18 13:40:44 +0100 |
---|---|---|
committer | Karolin Seeger <kseeger@samba.org> | 2010-02-19 14:32:31 +0100 |
commit | 5bcb63a2d7192ae69efe49b67fd3de001c9e9d5d (patch) | |
tree | 0ac91a0576d51a7172ab9741d517a644266a81a9 | |
parent | 8423dc74341d7b153131d0002aee8585af16582f (diff) | |
download | samba-5bcb63a2d7192ae69efe49b67fd3de001c9e9d5d.tar.gz |
libndr: for now align reverse relative pointers to 2 bytes by default.
This is just a hack and we should let the callers use FLAG_ALIGN2
explicit in future.
metze
(cherry picked from commit 4a76d29374769ba4c075b8d5767498848d2e17d6)
(cherry picked from commit d8251b5ab5e2d1abb8c69cc6ee2fe56bd074e48d)
-rw-r--r-- | librpc/ndr/ndr.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/librpc/ndr/ndr.c b/librpc/ndr/ndr.c index c5c6804afc2..da02682213d 100644 --- a/librpc/ndr/ndr.c +++ b/librpc/ndr/ndr.c @@ -1165,6 +1165,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) { |