s4:librpc/ndr: if uninitialized variable in string_array code
[Samba/gbeck.git] / librpc / gen_ndr / cli_echo.c
blobff369c7d5a9f65b6e76879a3a9d141c02b432f31
1 /*
2 * Unix SMB/CIFS implementation.
3 * client auto-generated by pidl. DO NOT MODIFY!
4 */
6 #include "includes.h"
7 #include "../librpc/gen_ndr/cli_echo.h"
9 NTSTATUS rpccli_echo_AddOne(struct rpc_pipe_client *cli,
10 TALLOC_CTX *mem_ctx,
11 uint32_t in_data /* [in] */,
12 uint32_t *out_data /* [out] [ref] */)
14 struct echo_AddOne r;
15 NTSTATUS status;
17 /* In parameters */
18 r.in.in_data = in_data;
20 if (DEBUGLEVEL >= 10) {
21 NDR_PRINT_IN_DEBUG(echo_AddOne, &r);
24 status = cli->dispatch(cli,
25 mem_ctx,
26 &ndr_table_rpcecho,
27 NDR_ECHO_ADDONE,
28 &r);
30 if (!NT_STATUS_IS_OK(status)) {
31 return status;
34 if (DEBUGLEVEL >= 10) {
35 NDR_PRINT_OUT_DEBUG(echo_AddOne, &r);
38 if (NT_STATUS_IS_ERR(status)) {
39 return status;
42 /* Return variables */
43 *out_data = *r.out.out_data;
45 /* Return result */
46 return NT_STATUS_OK;
49 NTSTATUS rpccli_echo_EchoData(struct rpc_pipe_client *cli,
50 TALLOC_CTX *mem_ctx,
51 uint32_t len /* [in] */,
52 uint8_t *in_data /* [in] [size_is(len)] */,
53 uint8_t *out_data /* [out] [size_is(len)] */)
55 struct echo_EchoData r;
56 NTSTATUS status;
58 /* In parameters */
59 r.in.len = len;
60 r.in.in_data = in_data;
62 if (DEBUGLEVEL >= 10) {
63 NDR_PRINT_IN_DEBUG(echo_EchoData, &r);
66 status = cli->dispatch(cli,
67 mem_ctx,
68 &ndr_table_rpcecho,
69 NDR_ECHO_ECHODATA,
70 &r);
72 if (!NT_STATUS_IS_OK(status)) {
73 return status;
76 if (DEBUGLEVEL >= 10) {
77 NDR_PRINT_OUT_DEBUG(echo_EchoData, &r);
80 if (NT_STATUS_IS_ERR(status)) {
81 return status;
84 /* Return variables */
85 memcpy(out_data, r.out.out_data, r.in.len * sizeof(*out_data));
87 /* Return result */
88 return NT_STATUS_OK;
91 NTSTATUS rpccli_echo_SinkData(struct rpc_pipe_client *cli,
92 TALLOC_CTX *mem_ctx,
93 uint32_t len /* [in] */,
94 uint8_t *data /* [in] [size_is(len)] */)
96 struct echo_SinkData r;
97 NTSTATUS status;
99 /* In parameters */
100 r.in.len = len;
101 r.in.data = data;
103 if (DEBUGLEVEL >= 10) {
104 NDR_PRINT_IN_DEBUG(echo_SinkData, &r);
107 status = cli->dispatch(cli,
108 mem_ctx,
109 &ndr_table_rpcecho,
110 NDR_ECHO_SINKDATA,
111 &r);
113 if (!NT_STATUS_IS_OK(status)) {
114 return status;
117 if (DEBUGLEVEL >= 10) {
118 NDR_PRINT_OUT_DEBUG(echo_SinkData, &r);
121 if (NT_STATUS_IS_ERR(status)) {
122 return status;
125 /* Return variables */
127 /* Return result */
128 return NT_STATUS_OK;
131 NTSTATUS rpccli_echo_SourceData(struct rpc_pipe_client *cli,
132 TALLOC_CTX *mem_ctx,
133 uint32_t len /* [in] */,
134 uint8_t *data /* [out] [size_is(len)] */)
136 struct echo_SourceData r;
137 NTSTATUS status;
139 /* In parameters */
140 r.in.len = len;
142 if (DEBUGLEVEL >= 10) {
143 NDR_PRINT_IN_DEBUG(echo_SourceData, &r);
146 status = cli->dispatch(cli,
147 mem_ctx,
148 &ndr_table_rpcecho,
149 NDR_ECHO_SOURCEDATA,
150 &r);
152 if (!NT_STATUS_IS_OK(status)) {
153 return status;
156 if (DEBUGLEVEL >= 10) {
157 NDR_PRINT_OUT_DEBUG(echo_SourceData, &r);
160 if (NT_STATUS_IS_ERR(status)) {
161 return status;
164 /* Return variables */
165 memcpy(data, r.out.data, r.in.len * sizeof(*data));
167 /* Return result */
168 return NT_STATUS_OK;
171 NTSTATUS rpccli_echo_TestCall(struct rpc_pipe_client *cli,
172 TALLOC_CTX *mem_ctx,
173 const char *s1 /* [in] [ref,charset(UTF16)] */,
174 const char **s2 /* [out] [ref,charset(UTF16)] */)
176 struct echo_TestCall r;
177 NTSTATUS status;
179 /* In parameters */
180 r.in.s1 = s1;
182 if (DEBUGLEVEL >= 10) {
183 NDR_PRINT_IN_DEBUG(echo_TestCall, &r);
186 status = cli->dispatch(cli,
187 mem_ctx,
188 &ndr_table_rpcecho,
189 NDR_ECHO_TESTCALL,
190 &r);
192 if (!NT_STATUS_IS_OK(status)) {
193 return status;
196 if (DEBUGLEVEL >= 10) {
197 NDR_PRINT_OUT_DEBUG(echo_TestCall, &r);
200 if (NT_STATUS_IS_ERR(status)) {
201 return status;
204 /* Return variables */
205 *s2 = *r.out.s2;
207 /* Return result */
208 return NT_STATUS_OK;
211 NTSTATUS rpccli_echo_TestCall2(struct rpc_pipe_client *cli,
212 TALLOC_CTX *mem_ctx,
213 uint16_t level /* [in] */,
214 union echo_Info *info /* [out] [ref,switch_is(level)] */)
216 struct echo_TestCall2 r;
217 NTSTATUS status;
219 /* In parameters */
220 r.in.level = level;
222 if (DEBUGLEVEL >= 10) {
223 NDR_PRINT_IN_DEBUG(echo_TestCall2, &r);
226 status = cli->dispatch(cli,
227 mem_ctx,
228 &ndr_table_rpcecho,
229 NDR_ECHO_TESTCALL2,
230 &r);
232 if (!NT_STATUS_IS_OK(status)) {
233 return status;
236 if (DEBUGLEVEL >= 10) {
237 NDR_PRINT_OUT_DEBUG(echo_TestCall2, &r);
240 if (NT_STATUS_IS_ERR(status)) {
241 return status;
244 /* Return variables */
245 *info = *r.out.info;
247 /* Return result */
248 return r.out.result;
251 NTSTATUS rpccli_echo_TestSleep(struct rpc_pipe_client *cli,
252 TALLOC_CTX *mem_ctx,
253 uint32_t seconds /* [in] */)
255 struct echo_TestSleep r;
256 NTSTATUS status;
258 /* In parameters */
259 r.in.seconds = seconds;
261 if (DEBUGLEVEL >= 10) {
262 NDR_PRINT_IN_DEBUG(echo_TestSleep, &r);
265 status = cli->dispatch(cli,
266 mem_ctx,
267 &ndr_table_rpcecho,
268 NDR_ECHO_TESTSLEEP,
269 &r);
271 if (!NT_STATUS_IS_OK(status)) {
272 return status;
275 if (DEBUGLEVEL >= 10) {
276 NDR_PRINT_OUT_DEBUG(echo_TestSleep, &r);
279 if (NT_STATUS_IS_ERR(status)) {
280 return status;
283 /* Return variables */
285 /* Return result */
286 return NT_STATUS_OK;
289 NTSTATUS rpccli_echo_TestEnum(struct rpc_pipe_client *cli,
290 TALLOC_CTX *mem_ctx,
291 enum echo_Enum1 *foo1 /* [in,out] [ref] */,
292 struct echo_Enum2 *foo2 /* [in,out] [ref] */,
293 union echo_Enum3 *foo3 /* [in,out] [ref,switch_is(*foo1)] */)
295 struct echo_TestEnum r;
296 NTSTATUS status;
298 /* In parameters */
299 r.in.foo1 = foo1;
300 r.in.foo2 = foo2;
301 r.in.foo3 = foo3;
303 if (DEBUGLEVEL >= 10) {
304 NDR_PRINT_IN_DEBUG(echo_TestEnum, &r);
307 status = cli->dispatch(cli,
308 mem_ctx,
309 &ndr_table_rpcecho,
310 NDR_ECHO_TESTENUM,
311 &r);
313 if (!NT_STATUS_IS_OK(status)) {
314 return status;
317 if (DEBUGLEVEL >= 10) {
318 NDR_PRINT_OUT_DEBUG(echo_TestEnum, &r);
321 if (NT_STATUS_IS_ERR(status)) {
322 return status;
325 /* Return variables */
326 *foo1 = *r.out.foo1;
327 *foo2 = *r.out.foo2;
328 *foo3 = *r.out.foo3;
330 /* Return result */
331 return NT_STATUS_OK;
334 NTSTATUS rpccli_echo_TestSurrounding(struct rpc_pipe_client *cli,
335 TALLOC_CTX *mem_ctx,
336 struct echo_Surrounding *data /* [in,out] [ref] */)
338 struct echo_TestSurrounding r;
339 NTSTATUS status;
341 /* In parameters */
342 r.in.data = data;
344 if (DEBUGLEVEL >= 10) {
345 NDR_PRINT_IN_DEBUG(echo_TestSurrounding, &r);
348 status = cli->dispatch(cli,
349 mem_ctx,
350 &ndr_table_rpcecho,
351 NDR_ECHO_TESTSURROUNDING,
352 &r);
354 if (!NT_STATUS_IS_OK(status)) {
355 return status;
358 if (DEBUGLEVEL >= 10) {
359 NDR_PRINT_OUT_DEBUG(echo_TestSurrounding, &r);
362 if (NT_STATUS_IS_ERR(status)) {
363 return status;
366 /* Return variables */
367 *data = *r.out.data;
369 /* Return result */
370 return NT_STATUS_OK;
373 NTSTATUS rpccli_echo_TestDoublePointer(struct rpc_pipe_client *cli,
374 TALLOC_CTX *mem_ctx,
375 uint16_t ***data /* [in] [ref] */)
377 struct echo_TestDoublePointer r;
378 NTSTATUS status;
380 /* In parameters */
381 r.in.data = data;
383 if (DEBUGLEVEL >= 10) {
384 NDR_PRINT_IN_DEBUG(echo_TestDoublePointer, &r);
387 status = cli->dispatch(cli,
388 mem_ctx,
389 &ndr_table_rpcecho,
390 NDR_ECHO_TESTDOUBLEPOINTER,
391 &r);
393 if (!NT_STATUS_IS_OK(status)) {
394 return status;
397 if (DEBUGLEVEL >= 10) {
398 NDR_PRINT_OUT_DEBUG(echo_TestDoublePointer, &r);
401 if (NT_STATUS_IS_ERR(status)) {
402 return status;
405 /* Return variables */
407 /* Return result */
408 return NT_STATUS_OK;