diff options
author | Andrew Tridgell <tridge@samba.org> | 2003-11-20 03:09:19 +0000 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 2003-11-20 03:09:19 +0000 |
commit | 308cc429eb7c07d94609f2818e9d81239cb4cbb9 (patch) | |
tree | 84c059b23956750a4ca196fb0faebb4c889f4718 /source4/librpc/ndr/ndr_basic.c | |
parent | cde87e39c68f599026cc350c37c0cafe0e7ebcb6 (diff) | |
download | samba-308cc429eb7c07d94609f2818e9d81239cb4cbb9.tar.gz samba-308cc429eb7c07d94609f2818e9d81239cb4cbb9.tar.bz2 samba-308cc429eb7c07d94609f2818e9d81239cb4cbb9.zip |
added samr_LookupNames() and test code
(This used to be commit f8397cbc8554b721093b8ae6ac6fb26d0ee9a7cf)
Diffstat (limited to 'source4/librpc/ndr/ndr_basic.c')
-rw-r--r-- | source4/librpc/ndr/ndr_basic.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/source4/librpc/ndr/ndr_basic.c b/source4/librpc/ndr/ndr_basic.c index fcf64b6790..0cb4456399 100644 --- a/source4/librpc/ndr/ndr_basic.c +++ b/source4/librpc/ndr/ndr_basic.c @@ -308,7 +308,15 @@ NTSTATUS ndr_push_length4_end(struct ndr_push *ndr, struct ndr_push_save *save) */ NTSTATUS ndr_push_ptr(struct ndr_push *ndr, const void *p) { - return ndr_push_uint32(ndr, p?0xaabbccdd:0); + uint32 ptr = 0; + if (p) { + /* we do this to ensure that we generate unique ref ids, + which means we can handle the case where a MS programmer + forgot to mark a pointer as unique */ + ndr->ptr_count++; + ptr = 0xaabbcc00 + ndr->ptr_count; + } + return ndr_push_uint32(ndr, ptr); } /* |