summaryrefslogtreecommitdiff
path: root/source3/librpc/gen_ndr
diff options
context:
space:
mode:
authorGerald Carter <jerry@samba.org>2006-09-20 19:26:21 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:00:53 -0500
commitb7d069097bdc8d1d9a0694225dd1583cb60c7b3c (patch)
tree0beab697fd861f1d97ad583373be06baec50da6f /source3/librpc/gen_ndr
parent5cadb916220155bc0532f2c8a5facb690bc99ea2 (diff)
downloadsamba-b7d069097bdc8d1d9a0694225dd1583cb60c7b3c.tar.gz
samba-b7d069097bdc8d1d9a0694225dd1583cb60c7b3c.tar.bz2
samba-b7d069097bdc8d1d9a0694225dd1583cb60c7b3c.zip
r18739: * Get the wkssvc patch right this time.
* Remove the old wkssvc server, client, & parsing code. * Update srv_wkssvc_nt.c with stubs for the remaining stubs (This used to be commit 0cb79ee13fd78b515a48b2c72d91596ed21e41a8)
Diffstat (limited to 'source3/librpc/gen_ndr')
-rw-r--r--source3/librpc/gen_ndr/ndr_wkssvc.c18
-rw-r--r--source3/librpc/gen_ndr/wkssvc.h4
2 files changed, 14 insertions, 8 deletions
diff --git a/source3/librpc/gen_ndr/ndr_wkssvc.c b/source3/librpc/gen_ndr/ndr_wkssvc.c
index 60bbc857d1..9455d09c5f 100644
--- a/source3/librpc/gen_ndr/ndr_wkssvc.c
+++ b/source3/librpc/gen_ndr/ndr_wkssvc.c
@@ -2680,7 +2680,8 @@ NTSTATUS ndr_push_wkssvc_NetWkstaTransportEnum(struct ndr_push *ndr, int flags,
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));
+ if (r->in.level == 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));
if (r->in.resume_handle == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
@@ -2690,7 +2691,8 @@ NTSTATUS ndr_push_wkssvc_NetWkstaTransportEnum(struct ndr_push *ndr, int flags,
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));
+ if (r->out.level == 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));
NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.totalentries));
if (r->out.totalentries) {
@@ -2745,7 +2747,8 @@ NTSTATUS ndr_pull_wkssvc_NetWkstaTransportEnum(struct ndr_pull *ndr, int flags,
}
_mem_save_ctr_0 = NDR_PULL_GET_MEM_CTX(ndr);
NDR_PULL_SET_MEM_CTX(ndr, r->in.ctr, LIBNDR_FLAG_REF_ALLOC);
- NDR_CHECK(ndr_pull_set_switch_value(ndr, r->in.ctr, r->in.level));
+ if (r->in.level == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ NDR_CHECK(ndr_pull_set_switch_value(ndr, r->in.ctr, *r->in.level));
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));
@@ -2776,7 +2779,8 @@ NTSTATUS ndr_pull_wkssvc_NetWkstaTransportEnum(struct ndr_pull *ndr, int flags,
}
_mem_save_ctr_0 = NDR_PULL_GET_MEM_CTX(ndr);
NDR_PULL_SET_MEM_CTX(ndr, r->out.ctr, LIBNDR_FLAG_REF_ALLOC);
- NDR_CHECK(ndr_pull_set_switch_value(ndr, r->out.ctr, r->out.level));
+ if (r->out.level == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ NDR_CHECK(ndr_pull_set_switch_value(ndr, r->out.ctr, *r->out.level));
NDR_CHECK(ndr_pull_wkssvc_NetWkstaTransportCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.ctr));
NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ctr_0, LIBNDR_FLAG_REF_ALLOC);
NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_totalentries));
@@ -2825,7 +2829,8 @@ _PUBLIC_ void ndr_print_wkssvc_NetWkstaTransportEnum(struct ndr_print *ndr, cons
ndr->depth--;
ndr_print_ptr(ndr, "ctr", r->in.ctr);
ndr->depth++;
- ndr_print_set_switch_value(ndr, r->in.ctr, r->in.level);
+ if (r->in.level == NULL) return;
+ ndr_print_set_switch_value(ndr, r->in.ctr, *r->in.level);
ndr_print_wkssvc_NetWkstaTransportCtr(ndr, "ctr", r->in.ctr);
ndr->depth--;
ndr_print_uint32(ndr, "max_buffer", r->in.max_buffer);
@@ -2844,7 +2849,8 @@ _PUBLIC_ void ndr_print_wkssvc_NetWkstaTransportEnum(struct ndr_print *ndr, cons
ndr->depth--;
ndr_print_ptr(ndr, "ctr", r->out.ctr);
ndr->depth++;
- ndr_print_set_switch_value(ndr, r->out.ctr, r->out.level);
+ if (r->out.level == NULL) return;
+ ndr_print_set_switch_value(ndr, r->out.ctr, *r->out.level);
ndr_print_wkssvc_NetWkstaTransportCtr(ndr, "ctr", r->out.ctr);
ndr->depth--;
ndr_print_ptr(ndr, "totalentries", r->out.totalentries);
diff --git a/source3/librpc/gen_ndr/wkssvc.h b/source3/librpc/gen_ndr/wkssvc.h
index f6b7d1fafb..84e6d19853 100644
--- a/source3/librpc/gen_ndr/wkssvc.h
+++ b/source3/librpc/gen_ndr/wkssvc.h
@@ -247,14 +247,14 @@ struct wkssvc_NetWkstaTransportEnum {
struct {
const char *server_name;/* [unique,charset(UTF16)] */
uint32_t *level;/* [ref] */
- union wkssvc_NetWkstaTransportCtr *ctr;/* [ref,switch_is(level)] */
+ union wkssvc_NetWkstaTransportCtr *ctr;/* [ref,switch_is(*level)] */
uint32_t max_buffer;
uint32_t *resume_handle;/* [ref] */
} in;
struct {
uint32_t *level;/* [ref] */
- union wkssvc_NetWkstaTransportCtr *ctr;/* [ref,switch_is(level)] */
+ union wkssvc_NetWkstaTransportCtr *ctr;/* [ref,switch_is(*level)] */
uint32_t *totalentries;/* [unique] */
uint32_t *resume_handle;/* [ref] */
WERROR result;