summaryrefslogtreecommitdiff
path: root/source3/librpc/gen_ndr/ndr_samr.c
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2008-02-08 17:00:31 -0800
committerJeremy Allison <jra@samba.org>2008-02-08 17:00:31 -0800
commitc7f34889591174ae335a37ab62747afab8fc418c (patch)
tree3dacbead8b7c8425e0e69bcebaa82b810f70976d /source3/librpc/gen_ndr/ndr_samr.c
parent7a694af2f4581b6ca96745f7b82318cb75d26d6e (diff)
parent5da927716a857ce686f3b75476671d32f047d2c0 (diff)
downloadsamba-c7f34889591174ae335a37ab62747afab8fc418c.tar.gz
samba-c7f34889591174ae335a37ab62747afab8fc418c.tar.bz2
samba-c7f34889591174ae335a37ab62747afab8fc418c.zip
Merge branch 'v3-2-test' of ssh://jra@git.samba.org/data/git/samba into v3-2-test
(This used to be commit 33a9859cbdb0dac035af36aa561b6acb24196c86)
Diffstat (limited to 'source3/librpc/gen_ndr/ndr_samr.c')
-rw-r--r--source3/librpc/gen_ndr/ndr_samr.c27
1 files changed, 24 insertions, 3 deletions
diff --git a/source3/librpc/gen_ndr/ndr_samr.c b/source3/librpc/gen_ndr/ndr_samr.c
index f257c17864..8c97ea1d95 100644
--- a/source3/librpc/gen_ndr/ndr_samr.c
+++ b/source3/librpc/gen_ndr/ndr_samr.c
@@ -5788,7 +5788,10 @@ static enum ndr_err_code ndr_push_samr_EnumDomains(struct ndr_push *ndr, int fla
if (r->out.sam == NULL) {
return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
}
- NDR_CHECK(ndr_push_samr_SamArray(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.sam));
+ NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.sam));
+ if (*r->out.sam) {
+ NDR_CHECK(ndr_push_samr_SamArray(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.sam));
+ }
if (r->out.num_entries == NULL) {
return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
}
@@ -5800,9 +5803,11 @@ static enum ndr_err_code ndr_push_samr_EnumDomains(struct ndr_push *ndr, int fla
static enum ndr_err_code ndr_pull_samr_EnumDomains(struct ndr_pull *ndr, int flags, struct samr_EnumDomains *r)
{
+ uint32_t _ptr_sam;
TALLOC_CTX *_mem_save_connect_handle_0;
TALLOC_CTX *_mem_save_resume_handle_0;
TALLOC_CTX *_mem_save_sam_0;
+ TALLOC_CTX *_mem_save_sam_1;
TALLOC_CTX *_mem_save_num_entries_0;
if (flags & NDR_IN) {
ZERO_STRUCT(r->out);
@@ -5842,7 +5847,18 @@ static enum ndr_err_code ndr_pull_samr_EnumDomains(struct ndr_pull *ndr, int fla
}
_mem_save_sam_0 = NDR_PULL_GET_MEM_CTX(ndr);
NDR_PULL_SET_MEM_CTX(ndr, r->out.sam, LIBNDR_FLAG_REF_ALLOC);
- NDR_CHECK(ndr_pull_samr_SamArray(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.sam));
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_sam));
+ if (_ptr_sam) {
+ NDR_PULL_ALLOC(ndr, *r->out.sam);
+ } else {
+ *r->out.sam = NULL;
+ }
+ if (*r->out.sam) {
+ _mem_save_sam_1 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, *r->out.sam, 0);
+ NDR_CHECK(ndr_pull_samr_SamArray(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.sam));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sam_1, 0);
+ }
NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sam_0, LIBNDR_FLAG_REF_ALLOC);
if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
NDR_PULL_ALLOC(ndr, r->out.num_entries);
@@ -5886,7 +5902,12 @@ _PUBLIC_ void ndr_print_samr_EnumDomains(struct ndr_print *ndr, const char *name
ndr->depth--;
ndr_print_ptr(ndr, "sam", r->out.sam);
ndr->depth++;
- ndr_print_samr_SamArray(ndr, "sam", r->out.sam);
+ ndr_print_ptr(ndr, "sam", *r->out.sam);
+ ndr->depth++;
+ if (*r->out.sam) {
+ ndr_print_samr_SamArray(ndr, "sam", *r->out.sam);
+ }
+ ndr->depth--;
ndr->depth--;
ndr_print_ptr(ndr, "num_entries", r->out.num_entries);
ndr->depth++;