summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2010-04-30 01:08:07 +0200
committerGünther Deschner <gd@samba.org>2010-05-27 23:25:15 +0200
commit7bcd9c5583ac2f750aa9c90af7d1ac86eb36f86f (patch)
tree001be60ae9404017484a8a17cee99bc9a1bb87d4
parent49a80fe6710a8c3c5977b35be2f55c2748b3bddc (diff)
downloadsamba-7bcd9c5583ac2f750aa9c90af7d1ac86eb36f86f.tar.gz
samba-7bcd9c5583ac2f750aa9c90af7d1ac86eb36f86f.tar.bz2
samba-7bcd9c5583ac2f750aa9c90af7d1ac86eb36f86f.zip
libndr: add support for relative_rap_convert.
Will not harm anyone, is only used for rare short (2byte) relative pointers, and relative_rap_convert is always 0 so far (as all init functions using struct ndr_pull will zero the struct). Guenther
-rw-r--r--librpc/ndr/libndr.h1
-rw-r--r--librpc/ndr/ndr_basic.c1
2 files changed, 2 insertions, 0 deletions
diff --git a/librpc/ndr/libndr.h b/librpc/ndr/libndr.h
index 133a119069..d5091a6619 100644
--- a/librpc/ndr/libndr.h
+++ b/librpc/ndr/libndr.h
@@ -62,6 +62,7 @@ struct ndr_pull {
uint32_t relative_highest_offset;
uint32_t relative_base_offset;
+ uint32_t relative_rap_convert;
struct ndr_token_list *relative_base_list;
struct ndr_token_list *relative_list;
diff --git a/librpc/ndr/ndr_basic.c b/librpc/ndr/ndr_basic.c
index f7d6ee0449..d0d58b0884 100644
--- a/librpc/ndr/ndr_basic.c
+++ b/librpc/ndr/ndr_basic.c
@@ -185,6 +185,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_relative_ptr_short(struct ndr_pull *ndr, uin
if (*v != 0) {
ndr->ptr_count++;
}
+ *(v) -= ndr->relative_rap_convert;
return NDR_ERR_SUCCESS;
}