summaryrefslogtreecommitdiff
path: root/source3/librpc
diff options
context:
space:
mode:
authorGerald Carter <jerry@samba.org>2006-09-20 17:03:06 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:00:52 -0500
commita1c53e50decad68fa8b969a45306f1634c53a25a (patch)
tree8e8115e3d69838822a32d1bd01b9de9ca19e5234 /source3/librpc
parented7f4ad60e8beb5dd473a6fccf4786e921dc2cdc (diff)
downloadsamba-a1c53e50decad68fa8b969a45306f1634c53a25a.tar.gz
samba-a1c53e50decad68fa8b969a45306f1634c53a25a.tar.bz2
samba-a1c53e50decad68fa8b969a45306f1634c53a25a.zip
r18718: Change a few out parameter to ref pointers and regenerate
(This used to be commit 91a48e9baaf210cf64a324e205a4786482ac4ebb)
Diffstat (limited to 'source3/librpc')
-rw-r--r--source3/librpc/gen_ndr/ndr_wkssvc.c106
-rw-r--r--source3/librpc/gen_ndr/wkssvc.h8
-rw-r--r--source3/librpc/idl/wkssvc.idl4
3 files changed, 42 insertions, 76 deletions
diff --git a/source3/librpc/gen_ndr/ndr_wkssvc.c b/source3/librpc/gen_ndr/ndr_wkssvc.c
index 6472fadd70..60bbc857d1 100644
--- a/source3/librpc/gen_ndr/ndr_wkssvc.c
+++ b/source3/librpc/gen_ndr/ndr_wkssvc.c
@@ -2677,24 +2677,18 @@ NTSTATUS ndr_push_wkssvc_NetWkstaTransportEnum(struct ndr_push *ndr, int flags,
NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_name, CH_UTF16)));
NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.server_name, ndr_charset_length(r->in.server_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
}
- NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.level));
- if (r->in.level) {
- NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.level));
- }
+ if (r->in.level == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.level));
if (r->in.ctr == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
NDR_CHECK(ndr_push_set_switch_value(ndr, r->in.ctr, r->in.level));
NDR_CHECK(ndr_push_wkssvc_NetWkstaTransportCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.ctr));
NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.max_buffer));
- NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.resume_handle));
- if (r->in.resume_handle) {
- NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.resume_handle));
- }
+ if (r->in.resume_handle == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.resume_handle));
}
if (flags & NDR_OUT) {
- NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.level));
- if (r->out.level) {
- NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.level));
- }
+ if (r->out.level == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.level));
if (r->out.ctr == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
NDR_CHECK(ndr_push_set_switch_value(ndr, r->out.ctr, r->out.level));
NDR_CHECK(ndr_push_wkssvc_NetWkstaTransportCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.ctr));
@@ -2702,10 +2696,8 @@ NTSTATUS ndr_push_wkssvc_NetWkstaTransportEnum(struct ndr_push *ndr, int flags,
if (r->out.totalentries) {
NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.totalentries));
}
- NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.resume_handle));
- if (r->out.resume_handle) {
- NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.resume_handle));
- }
+ if (r->out.resume_handle == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.resume_handle));
NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
}
return NT_STATUS_OK;
@@ -2714,9 +2706,7 @@ NTSTATUS ndr_push_wkssvc_NetWkstaTransportEnum(struct ndr_push *ndr, int flags,
NTSTATUS ndr_pull_wkssvc_NetWkstaTransportEnum(struct ndr_pull *ndr, int flags, struct wkssvc_NetWkstaTransportEnum *r)
{
uint32_t _ptr_server_name;
- uint32_t _ptr_level;
uint32_t _ptr_totalentries;
- uint32_t _ptr_resume_handle;
TALLOC_CTX *_mem_save_server_name_0;
TALLOC_CTX *_mem_save_level_0;
TALLOC_CTX *_mem_save_ctr_0;
@@ -2743,18 +2733,13 @@ NTSTATUS ndr_pull_wkssvc_NetWkstaTransportEnum(struct ndr_pull *ndr, int flags,
NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_name, ndr_get_array_length(ndr, &r->in.server_name), sizeof(uint16_t), CH_UTF16));
NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_name_0, 0);
}
- NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_level));
- if (_ptr_level) {
+ if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
NDR_PULL_ALLOC(ndr, r->in.level);
- } else {
- r->in.level = NULL;
- }
- if (r->in.level) {
- _mem_save_level_0 = NDR_PULL_GET_MEM_CTX(ndr);
- NDR_PULL_SET_MEM_CTX(ndr, r->in.level, 0);
- NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.level));
- NDR_PULL_SET_MEM_CTX(ndr, _mem_save_level_0, 0);
}
+ _mem_save_level_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.level, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.level));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_level_0, LIBNDR_FLAG_REF_ALLOC);
if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
NDR_PULL_ALLOC(ndr, r->in.ctr);
}
@@ -2764,34 +2749,28 @@ NTSTATUS ndr_pull_wkssvc_NetWkstaTransportEnum(struct ndr_pull *ndr, int flags,
NDR_CHECK(ndr_pull_wkssvc_NetWkstaTransportCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.ctr));
NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ctr_0, LIBNDR_FLAG_REF_ALLOC);
NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.max_buffer));
- NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_resume_handle));
- if (_ptr_resume_handle) {
+ if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
NDR_PULL_ALLOC(ndr, r->in.resume_handle);
- } else {
- r->in.resume_handle = NULL;
- }
- if (r->in.resume_handle) {
- _mem_save_resume_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
- NDR_PULL_SET_MEM_CTX(ndr, r->in.resume_handle, 0);
- NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.resume_handle));
- NDR_PULL_SET_MEM_CTX(ndr, _mem_save_resume_handle_0, 0);
}
+ _mem_save_resume_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.resume_handle, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.resume_handle));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_resume_handle_0, LIBNDR_FLAG_REF_ALLOC);
+ NDR_PULL_ALLOC(ndr, r->out.level);
+ *r->out.level = *r->in.level;
NDR_PULL_ALLOC(ndr, r->out.ctr);
*r->out.ctr = *r->in.ctr;
+ NDR_PULL_ALLOC(ndr, r->out.resume_handle);
+ *r->out.resume_handle = *r->in.resume_handle;
}
if (flags & NDR_OUT) {
- NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_level));
- if (_ptr_level) {
+ if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
NDR_PULL_ALLOC(ndr, r->out.level);
- } else {
- r->out.level = NULL;
- }
- if (r->out.level) {
- _mem_save_level_0 = NDR_PULL_GET_MEM_CTX(ndr);
- NDR_PULL_SET_MEM_CTX(ndr, r->out.level, 0);
- NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.level));
- NDR_PULL_SET_MEM_CTX(ndr, _mem_save_level_0, 0);
}
+ _mem_save_level_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->out.level, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.level));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_level_0, LIBNDR_FLAG_REF_ALLOC);
if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
NDR_PULL_ALLOC(ndr, r->out.ctr);
}
@@ -2812,18 +2791,13 @@ NTSTATUS ndr_pull_wkssvc_NetWkstaTransportEnum(struct ndr_pull *ndr, int flags,
NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.totalentries));
NDR_PULL_SET_MEM_CTX(ndr, _mem_save_totalentries_0, 0);
}
- NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_resume_handle));
- if (_ptr_resume_handle) {
+ if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
NDR_PULL_ALLOC(ndr, r->out.resume_handle);
- } else {
- r->out.resume_handle = NULL;
- }
- if (r->out.resume_handle) {
- _mem_save_resume_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
- NDR_PULL_SET_MEM_CTX(ndr, r->out.resume_handle, 0);
- NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.resume_handle));
- NDR_PULL_SET_MEM_CTX(ndr, _mem_save_resume_handle_0, 0);
}
+ _mem_save_resume_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->out.resume_handle, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.resume_handle));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_resume_handle_0, LIBNDR_FLAG_REF_ALLOC);
NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
}
return NT_STATUS_OK;
@@ -2847,9 +2821,7 @@ _PUBLIC_ void ndr_print_wkssvc_NetWkstaTransportEnum(struct ndr_print *ndr, cons
ndr->depth--;
ndr_print_ptr(ndr, "level", r->in.level);
ndr->depth++;
- if (r->in.level) {
- ndr_print_uint32(ndr, "level", *r->in.level);
- }
+ ndr_print_uint32(ndr, "level", *r->in.level);
ndr->depth--;
ndr_print_ptr(ndr, "ctr", r->in.ctr);
ndr->depth++;
@@ -2859,9 +2831,7 @@ _PUBLIC_ void ndr_print_wkssvc_NetWkstaTransportEnum(struct ndr_print *ndr, cons
ndr_print_uint32(ndr, "max_buffer", r->in.max_buffer);
ndr_print_ptr(ndr, "resume_handle", r->in.resume_handle);
ndr->depth++;
- if (r->in.resume_handle) {
- ndr_print_uint32(ndr, "resume_handle", *r->in.resume_handle);
- }
+ ndr_print_uint32(ndr, "resume_handle", *r->in.resume_handle);
ndr->depth--;
ndr->depth--;
}
@@ -2870,9 +2840,7 @@ _PUBLIC_ void ndr_print_wkssvc_NetWkstaTransportEnum(struct ndr_print *ndr, cons
ndr->depth++;
ndr_print_ptr(ndr, "level", r->out.level);
ndr->depth++;
- if (r->out.level) {
- ndr_print_uint32(ndr, "level", *r->out.level);
- }
+ ndr_print_uint32(ndr, "level", *r->out.level);
ndr->depth--;
ndr_print_ptr(ndr, "ctr", r->out.ctr);
ndr->depth++;
@@ -2887,9 +2855,7 @@ _PUBLIC_ void ndr_print_wkssvc_NetWkstaTransportEnum(struct ndr_print *ndr, cons
ndr->depth--;
ndr_print_ptr(ndr, "resume_handle", r->out.resume_handle);
ndr->depth++;
- if (r->out.resume_handle) {
- ndr_print_uint32(ndr, "resume_handle", *r->out.resume_handle);
- }
+ ndr_print_uint32(ndr, "resume_handle", *r->out.resume_handle);
ndr->depth--;
ndr_print_WERROR(ndr, "result", r->out.result);
ndr->depth--;
diff --git a/source3/librpc/gen_ndr/wkssvc.h b/source3/librpc/gen_ndr/wkssvc.h
index 4dd971f223..f6b7d1fafb 100644
--- a/source3/librpc/gen_ndr/wkssvc.h
+++ b/source3/librpc/gen_ndr/wkssvc.h
@@ -246,17 +246,17 @@ struct WKSSVC_NETRWKSTAUSERSETINFO {
struct wkssvc_NetWkstaTransportEnum {
struct {
const char *server_name;/* [unique,charset(UTF16)] */
- uint32_t *level;/* [unique] */
+ uint32_t *level;/* [ref] */
union wkssvc_NetWkstaTransportCtr *ctr;/* [ref,switch_is(level)] */
uint32_t max_buffer;
- uint32_t *resume_handle;/* [unique] */
+ uint32_t *resume_handle;/* [ref] */
} in;
struct {
- uint32_t *level;/* [unique] */
+ uint32_t *level;/* [ref] */
union wkssvc_NetWkstaTransportCtr *ctr;/* [ref,switch_is(level)] */
uint32_t *totalentries;/* [unique] */
- uint32_t *resume_handle;/* [unique] */
+ uint32_t *resume_handle;/* [ref] */
WERROR result;
} out;
diff --git a/source3/librpc/idl/wkssvc.idl b/source3/librpc/idl/wkssvc.idl
index 86cd795f0e..8c789fd8ca 100644
--- a/source3/librpc/idl/wkssvc.idl
+++ b/source3/librpc/idl/wkssvc.idl
@@ -216,11 +216,11 @@
WERROR wkssvc_NetWkstaTransportEnum (
[in] [string,charset(UTF16)] uint16 *server_name,
- [in,out] uint32 *level,
+ [in,out,ref] uint32 *level,
[in,out,switch_is(level),ref] wkssvc_NetWkstaTransportCtr *ctr,
[in] uint32 max_buffer,
[out] uint32 *totalentries,
- [in,out] uint32 *resume_handle
+ [in,out,ref] uint32 *resume_handle
);