diff options
author | Günther Deschner <gd@samba.org> | 2009-03-06 14:23:44 +0100 |
---|---|---|
committer | Günther Deschner <gd@samba.org> | 2009-03-06 14:28:41 +0100 |
commit | b4707d8df34d3c1e28270e0c054bcf6b8c3758b5 (patch) | |
tree | 69e29f8fca65706eae9f0c383a1d30a2166502a5 /librpc/gen_ndr | |
parent | 75046db121ea858fcc22da7b4410aea9eea70e67 (diff) | |
download | samba-b4707d8df34d3c1e28270e0c054bcf6b8c3758b5.tar.gz samba-b4707d8df34d3c1e28270e0c054bcf6b8c3758b5.tar.bz2 samba-b4707d8df34d3c1e28270e0c054bcf6b8c3758b5.zip |
s3: re-run make samba3-idl.
Guenther
Diffstat (limited to 'librpc/gen_ndr')
-rw-r--r-- | librpc/gen_ndr/cli_spoolss.c | 28 | ||||
-rw-r--r-- | librpc/gen_ndr/cli_spoolss.h | 14 | ||||
-rw-r--r-- | librpc/gen_ndr/ndr_spoolss.c | 168 | ||||
-rw-r--r-- | librpc/gen_ndr/spoolss.h | 14 | ||||
-rw-r--r-- | librpc/gen_ndr/srv_spoolss.c | 28 |
5 files changed, 126 insertions, 126 deletions
diff --git a/librpc/gen_ndr/cli_spoolss.c b/librpc/gen_ndr/cli_spoolss.c index 59e8b2f04f..87e305f09e 100644 --- a/librpc/gen_ndr/cli_spoolss.c +++ b/librpc/gen_ndr/cli_spoolss.c @@ -14,7 +14,7 @@ NTSTATUS rpccli_spoolss_EnumPrinters(struct rpc_pipe_client *cli, DATA_BLOB *buffer /* [in] [unique] */, uint32_t offered /* [in] */, uint32_t *count /* [out] [ref] */, - union spoolss_PrinterInfo **info /* [out] [ref,switch_is(level),size_is(*count)] */, + union spoolss_PrinterInfo **info /* [out] [ref,switch_is(level),size_is(,*count)] */, uint32_t *needed /* [out] [ref] */, WERROR *werror) { @@ -52,7 +52,7 @@ NTSTATUS rpccli_spoolss_EnumPrinters(struct rpc_pipe_client *cli, /* Return variables */ *count = *r.out.count; - memcpy(info, r.out.info, *count * sizeof(*info)); + *info = *r.out.info; *needed = *r.out.needed; /* Return result */ @@ -229,7 +229,7 @@ NTSTATUS rpccli_spoolss_EnumJobs(struct rpc_pipe_client *cli, DATA_BLOB *buffer /* [in] [unique] */, uint32_t offered /* [in] */, uint32_t *count /* [out] [ref] */, - union spoolss_JobInfo **info /* [out] [ref,switch_is(level),size_is(*count)] */, + union spoolss_JobInfo **info /* [out] [ref,switch_is(level),size_is(,*count)] */, uint32_t *needed /* [out] [ref] */, WERROR *werror) { @@ -268,7 +268,7 @@ NTSTATUS rpccli_spoolss_EnumJobs(struct rpc_pipe_client *cli, /* Return variables */ *count = *r.out.count; - memcpy(info, r.out.info, *count * sizeof(*info)); + *info = *r.out.info; *needed = *r.out.needed; /* Return result */ @@ -522,7 +522,7 @@ NTSTATUS rpccli_spoolss_EnumPrinterDrivers(struct rpc_pipe_client *cli, DATA_BLOB *buffer /* [in] [unique] */, uint32_t offered /* [in] */, uint32_t *count /* [out] [ref] */, - union spoolss_DriverInfo **info /* [out] [ref,switch_is(level),size_is(*count)] */, + union spoolss_DriverInfo **info /* [out] [ref,switch_is(level),size_is(,*count)] */, uint32_t *needed /* [out] [ref] */, WERROR *werror) { @@ -560,7 +560,7 @@ NTSTATUS rpccli_spoolss_EnumPrinterDrivers(struct rpc_pipe_client *cli, /* Return variables */ *count = *r.out.count; - memcpy(info, r.out.info, *count * sizeof(*info)); + *info = *r.out.info; *needed = *r.out.needed; /* Return result */ @@ -773,7 +773,7 @@ NTSTATUS rpccli_spoolss_EnumPrintProcessors(struct rpc_pipe_client *cli, DATA_BLOB *buffer /* [in] [unique] */, uint32_t offered /* [in] */, uint32_t *count /* [out] [ref] */, - union spoolss_PrintProcessorInfo **info /* [out] [ref,switch_is(level),size_is(*count)] */, + union spoolss_PrintProcessorInfo **info /* [out] [ref,switch_is(level),size_is(,*count)] */, uint32_t *needed /* [out] [ref] */, WERROR *werror) { @@ -811,7 +811,7 @@ NTSTATUS rpccli_spoolss_EnumPrintProcessors(struct rpc_pipe_client *cli, /* Return variables */ *count = *r.out.count; - memcpy(info, r.out.info, *count * sizeof(*info)); + *info = *r.out.info; *needed = *r.out.needed; /* Return result */ @@ -1691,7 +1691,7 @@ NTSTATUS rpccli_spoolss_EnumForms(struct rpc_pipe_client *cli, DATA_BLOB *buffer /* [in] [unique] */, uint32_t offered /* [in] */, uint32_t *count /* [out] [ref] */, - union spoolss_FormInfo **info /* [out] [ref,switch_is(level),size_is(*count)] */, + union spoolss_FormInfo **info /* [out] [ref,switch_is(level),size_is(,*count)] */, uint32_t *needed /* [out] [ref] */, WERROR *werror) { @@ -1728,7 +1728,7 @@ NTSTATUS rpccli_spoolss_EnumForms(struct rpc_pipe_client *cli, /* Return variables */ *count = *r.out.count; - memcpy(info, r.out.info, *count * sizeof(*info)); + *info = *r.out.info; *needed = *r.out.needed; /* Return result */ @@ -1746,7 +1746,7 @@ NTSTATUS rpccli_spoolss_EnumPorts(struct rpc_pipe_client *cli, DATA_BLOB *buffer /* [in] [unique] */, uint32_t offered /* [in] */, uint32_t *count /* [out] [ref] */, - union spoolss_PortInfo **info /* [out] [ref,switch_is(level),size_is(*count)] */, + union spoolss_PortInfo **info /* [out] [ref,switch_is(level),size_is(,*count)] */, uint32_t *needed /* [out] [ref] */, WERROR *werror) { @@ -1783,7 +1783,7 @@ NTSTATUS rpccli_spoolss_EnumPorts(struct rpc_pipe_client *cli, /* Return variables */ *count = *r.out.count; - memcpy(info, r.out.info, *count * sizeof(*info)); + *info = *r.out.info; *needed = *r.out.needed; /* Return result */ @@ -1801,7 +1801,7 @@ NTSTATUS rpccli_spoolss_EnumMonitors(struct rpc_pipe_client *cli, DATA_BLOB *buffer /* [in] [unique] */, uint32_t offered /* [in] */, uint32_t *count /* [out] [ref] */, - union spoolss_MonitorInfo **info /* [out] [ref,switch_is(level),size_is(*count)] */, + union spoolss_MonitorInfo **info /* [out] [ref,switch_is(level),size_is(,*count)] */, uint32_t *needed /* [out] [ref] */, WERROR *werror) { @@ -1838,7 +1838,7 @@ NTSTATUS rpccli_spoolss_EnumMonitors(struct rpc_pipe_client *cli, /* Return variables */ *count = *r.out.count; - memcpy(info, r.out.info, *count * sizeof(*info)); + *info = *r.out.info; *needed = *r.out.needed; /* Return result */ diff --git a/librpc/gen_ndr/cli_spoolss.h b/librpc/gen_ndr/cli_spoolss.h index 7e9e0f1f04..ba766d9638 100644 --- a/librpc/gen_ndr/cli_spoolss.h +++ b/librpc/gen_ndr/cli_spoolss.h @@ -9,7 +9,7 @@ NTSTATUS rpccli_spoolss_EnumPrinters(struct rpc_pipe_client *cli, DATA_BLOB *buffer /* [in] [unique] */, uint32_t offered /* [in] */, uint32_t *count /* [out] [ref] */, - union spoolss_PrinterInfo **info /* [out] [ref,switch_is(level),size_is(*count)] */, + union spoolss_PrinterInfo **info /* [out] [ref,switch_is(level),size_is(,*count)] */, uint32_t *needed /* [out] [ref] */, WERROR *werror); NTSTATUS rpccli_spoolss_OpenPrinter(struct rpc_pipe_client *cli, @@ -46,7 +46,7 @@ NTSTATUS rpccli_spoolss_EnumJobs(struct rpc_pipe_client *cli, DATA_BLOB *buffer /* [in] [unique] */, uint32_t offered /* [in] */, uint32_t *count /* [out] [ref] */, - union spoolss_JobInfo **info /* [out] [ref,switch_is(level),size_is(*count)] */, + union spoolss_JobInfo **info /* [out] [ref,switch_is(level),size_is(,*count)] */, uint32_t *needed /* [out] [ref] */, WERROR *werror); NTSTATUS rpccli_spoolss_AddPrinter(struct rpc_pipe_client *cli, @@ -86,7 +86,7 @@ NTSTATUS rpccli_spoolss_EnumPrinterDrivers(struct rpc_pipe_client *cli, DATA_BLOB *buffer /* [in] [unique] */, uint32_t offered /* [in] */, uint32_t *count /* [out] [ref] */, - union spoolss_DriverInfo **info /* [out] [ref,switch_is(level),size_is(*count)] */, + union spoolss_DriverInfo **info /* [out] [ref,switch_is(level),size_is(,*count)] */, uint32_t *needed /* [out] [ref] */, WERROR *werror); NTSTATUS rpccli_spoolss_GetPrinterDriver(struct rpc_pipe_client *cli, @@ -123,7 +123,7 @@ NTSTATUS rpccli_spoolss_EnumPrintProcessors(struct rpc_pipe_client *cli, DATA_BLOB *buffer /* [in] [unique] */, uint32_t offered /* [in] */, uint32_t *count /* [out] [ref] */, - union spoolss_PrintProcessorInfo **info /* [out] [ref,switch_is(level),size_is(*count)] */, + union spoolss_PrintProcessorInfo **info /* [out] [ref,switch_is(level),size_is(,*count)] */, uint32_t *needed /* [out] [ref] */, WERROR *werror); NTSTATUS rpccli_spoolss_GetPrintProcessorDirectory(struct rpc_pipe_client *cli, @@ -245,7 +245,7 @@ NTSTATUS rpccli_spoolss_EnumForms(struct rpc_pipe_client *cli, DATA_BLOB *buffer /* [in] [unique] */, uint32_t offered /* [in] */, uint32_t *count /* [out] [ref] */, - union spoolss_FormInfo **info /* [out] [ref,switch_is(level),size_is(*count)] */, + union spoolss_FormInfo **info /* [out] [ref,switch_is(level),size_is(,*count)] */, uint32_t *needed /* [out] [ref] */, WERROR *werror); NTSTATUS rpccli_spoolss_EnumPorts(struct rpc_pipe_client *cli, @@ -255,7 +255,7 @@ NTSTATUS rpccli_spoolss_EnumPorts(struct rpc_pipe_client *cli, DATA_BLOB *buffer /* [in] [unique] */, uint32_t offered /* [in] */, uint32_t *count /* [out] [ref] */, - union spoolss_PortInfo **info /* [out] [ref,switch_is(level),size_is(*count)] */, + union spoolss_PortInfo **info /* [out] [ref,switch_is(level),size_is(,*count)] */, uint32_t *needed /* [out] [ref] */, WERROR *werror); NTSTATUS rpccli_spoolss_EnumMonitors(struct rpc_pipe_client *cli, @@ -265,7 +265,7 @@ NTSTATUS rpccli_spoolss_EnumMonitors(struct rpc_pipe_client *cli, DATA_BLOB *buffer /* [in] [unique] */, uint32_t offered /* [in] */, uint32_t *count /* [out] [ref] */, - union spoolss_MonitorInfo **info /* [out] [ref,switch_is(level),size_is(*count)] */, + union spoolss_MonitorInfo **info /* [out] [ref,switch_is(level),size_is(,*count)] */, uint32_t *needed /* [out] [ref] */, WERROR *werror); NTSTATUS rpccli_spoolss_AddPort(struct rpc_pipe_client *cli, diff --git a/librpc/gen_ndr/ndr_spoolss.c b/librpc/gen_ndr/ndr_spoolss.c index 2703141b5e..576965be69 100644 --- a/librpc/gen_ndr/ndr_spoolss.c +++ b/librpc/gen_ndr/ndr_spoolss.c @@ -18374,7 +18374,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull___spoolss_EnumPrinters(struct ndr_pull *ndr, _PUBLIC_ void ndr_print_spoolss_EnumPrinters(struct ndr_print *ndr, const char *name, int flags, const struct spoolss_EnumPrinters *r) { - uint32_t cntr_info_1; + uint32_t cntr_info_2; ndr_print_struct(ndr, name, "spoolss_EnumPrinters"); ndr->depth++; if (flags & NDR_SET_VALUES) { @@ -18409,20 +18409,20 @@ _PUBLIC_ void ndr_print_spoolss_EnumPrinters(struct ndr_print *ndr, const char * ndr->depth--; ndr_print_ptr(ndr, "info", r->out.info); ndr->depth++; - ndr->print(ndr, "%s: ARRAY(%d)", "info", (int)*r->out.count); + ndr_print_ptr(ndr, "info", *r->out.info); ndr->depth++; - for (cntr_info_1=0;cntr_info_1<*r->out.count;cntr_info_1++) { - char *idx_1=NULL; - if (asprintf(&idx_1, "[%d]", cntr_info_1) != -1) { - ndr_print_ptr(ndr, "info", r->out.info[cntr_info_1]); - ndr->depth++; - if (r->out.info[cntr_info_1]) { - ndr_print_set_switch_value(ndr, r->out.info[cntr_info_1], r->in.level); - ndr_print_spoolss_PrinterInfo(ndr, "info", r->out.info[cntr_info_1]); + if (*r->out.info) { + ndr->print(ndr, "%s: ARRAY(%d)", "info", (int)*r->out.count); + ndr->depth++; + for (cntr_info_2=0;cntr_info_2<*r->out.count;cntr_info_2++) { + char *idx_2=NULL; + if (asprintf(&idx_2, "[%d]", cntr_info_2) != -1) { + ndr_print_set_switch_value(ndr, &(*r->out.info)[cntr_info_2], r->in.level); + ndr_print_spoolss_PrinterInfo(ndr, "info", &(*r->out.info)[cntr_info_2]); + free(idx_2); } - ndr->depth--; - free(idx_1); } + ndr->depth--; } ndr->depth--; ndr->depth--; @@ -18956,7 +18956,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull___spoolss_EnumJobs(struct ndr_pull *ndr, int _PUBLIC_ void ndr_print_spoolss_EnumJobs(struct ndr_print *ndr, const char *name, int flags, const struct spoolss_EnumJobs *r) { - uint32_t cntr_info_1; + uint32_t cntr_info_2; ndr_print_struct(ndr, name, "spoolss_EnumJobs"); ndr->depth++; if (flags & NDR_SET_VALUES) { @@ -18990,20 +18990,20 @@ _PUBLIC_ void ndr_print_spoolss_EnumJobs(struct ndr_print *ndr, const char *name ndr->depth--; ndr_print_ptr(ndr, "info", r->out.info); ndr->depth++; - ndr->print(ndr, "%s: ARRAY(%d)", "info", (int)*r->out.count); + ndr_print_ptr(ndr, "info", *r->out.info); ndr->depth++; - for (cntr_info_1=0;cntr_info_1<*r->out.count;cntr_info_1++) { - char *idx_1=NULL; - if (asprintf(&idx_1, "[%d]", cntr_info_1) != -1) { - ndr_print_ptr(ndr, "info", r->out.info[cntr_info_1]); - ndr->depth++; - if (r->out.info[cntr_info_1]) { - ndr_print_set_switch_value(ndr, r->out.info[cntr_info_1], r->in.level); - ndr_print_spoolss_JobInfo(ndr, "info", r->out.info[cntr_info_1]); + if (*r->out.info) { + ndr->print(ndr, "%s: ARRAY(%d)", "info", (int)*r->out.count); + ndr->depth++; + for (cntr_info_2=0;cntr_info_2<*r->out.count;cntr_info_2++) { + char *idx_2=NULL; + if (asprintf(&idx_2, "[%d]", cntr_info_2) != -1) { + ndr_print_set_switch_value(ndr, &(*r->out.info)[cntr_info_2], r->in.level); + ndr_print_spoolss_JobInfo(ndr, "info", &(*r->out.info)[cntr_info_2]); + free(idx_2); } - ndr->depth--; - free(idx_1); } + ndr->depth--; } ndr->depth--; ndr->depth--; @@ -19648,7 +19648,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull___spoolss_EnumPrinterDrivers(struct ndr_pull _PUBLIC_ void ndr_print_spoolss_EnumPrinterDrivers(struct ndr_print *ndr, const char *name, int flags, const struct spoolss_EnumPrinterDrivers *r) { - uint32_t cntr_info_1; + uint32_t cntr_info_2; ndr_print_struct(ndr, name, "spoolss_EnumPrinterDrivers"); ndr->depth++; if (flags & NDR_SET_VALUES) { @@ -19688,20 +19688,20 @@ _PUBLIC_ void ndr_print_spoolss_EnumPrinterDrivers(struct ndr_print *ndr, const ndr->depth--; ndr_print_ptr(ndr, "info", r->out.info); ndr->depth++; - ndr->print(ndr, "%s: ARRAY(%d)", "info", (int)*r->out.count); + ndr_print_ptr(ndr, "info", *r->out.info); ndr->depth++; - for (cntr_info_1=0;cntr_info_1<*r->out.count;cntr_info_1++) { - char *idx_1=NULL; - if (asprintf(&idx_1, "[%d]", cntr_info_1) != -1) { - ndr_print_ptr(ndr, "info", r->out.info[cntr_info_1]); - ndr->depth++; - if (r->out.info[cntr_info_1]) { - ndr_print_set_switch_value(ndr, r->out.info[cntr_info_1], r->in.level); - ndr_print_spoolss_DriverInfo(ndr, "info", r->out.info[cntr_info_1]); + if (*r->out.info) { + ndr->print(ndr, "%s: ARRAY(%d)", "info", (int)*r->out.count); + ndr->depth++; + for (cntr_info_2=0;cntr_info_2<*r->out.count;cntr_info_2++) { + char *idx_2=NULL; + if (asprintf(&idx_2, "[%d]", cntr_info_2) != -1) { + ndr_print_set_switch_value(ndr, &(*r->out.info)[cntr_info_2], r->in.level); + ndr_print_spoolss_DriverInfo(ndr, "info", &(*r->out.info)[cntr_info_2]); + free(idx_2); } - ndr->depth--; - free(idx_1); } + ndr->depth--; } ndr->depth--; ndr->depth--; @@ -20349,7 +20349,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull___spoolss_EnumPrintProcessors(struct ndr_pul _PUBLIC_ void ndr_print_spoolss_EnumPrintProcessors(struct ndr_print *ndr, const char *name, int flags, const struct spoolss_EnumPrintProcessors *r) { - uint32_t cntr_info_1; + uint32_t cntr_info_2; ndr_print_struct(ndr, name, "spoolss_EnumPrintProcessors"); ndr->depth++; if (flags & NDR_SET_VALUES) { @@ -20389,20 +20389,20 @@ _PUBLIC_ void ndr_print_spoolss_EnumPrintProcessors(struct ndr_print *ndr, const ndr->depth--; ndr_print_ptr(ndr, "info", r->out.info); ndr->depth++; - ndr->print(ndr, "%s: ARRAY(%d)", "info", (int)*r->out.count); + ndr_print_ptr(ndr, "info", *r->out.info); ndr->depth++; - for (cntr_info_1=0;cntr_info_1<*r->out.count;cntr_info_1++) { - char *idx_1=NULL; - if (asprintf(&idx_1, "[%d]", cntr_info_1) != -1) { - ndr_print_ptr(ndr, "info", r->out.info[cntr_info_1]); - ndr->depth++; - if (r->out.info[cntr_info_1]) { - ndr_print_set_switch_value(ndr, r->out.info[cntr_info_1], r->in.level); - ndr_print_spoolss_PrintProcessorInfo(ndr, "info", r->out.info[cntr_info_1]); + if (*r->out.info) { + ndr->print(ndr, "%s: ARRAY(%d)", "info", (int)*r->out.count); + ndr->depth++; + for (cntr_info_2=0;cntr_info_2<*r->out.count;cntr_info_2++) { + char *idx_2=NULL; + if (asprintf(&idx_2, "[%d]", cntr_info_2) != -1) { + ndr_print_set_switch_value(ndr, &(*r->out.info)[cntr_info_2], r->in.level); + ndr_print_spoolss_PrintProcessorInfo(ndr, "info", &(*r->out.info)[cntr_info_2]); + free(idx_2); } - ndr->depth--; - free(idx_1); } + ndr->depth--; } ndr->depth--; ndr->depth--; @@ -22179,7 +22179,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull___spoolss_EnumForms(struct ndr_pull *ndr, in _PUBLIC_ void ndr_print_spoolss_EnumForms(struct ndr_print *ndr, const char *name, int flags, const struct spoolss_EnumForms *r) { - uint32_t cntr_info_1; + uint32_t cntr_info_2; ndr_print_struct(ndr, name, "spoolss_EnumForms"); ndr->depth++; if (flags & NDR_SET_VALUES) { @@ -22211,20 +22211,20 @@ _PUBLIC_ void ndr_print_spoolss_EnumForms(struct ndr_print *ndr, const char *nam ndr->depth--; ndr_print_ptr(ndr, "info", r->out.info); ndr->depth++; - ndr->print(ndr, "%s: ARRAY(%d)", "info", (int)*r->out.count); + ndr_print_ptr(ndr, "info", *r->out.info); ndr->depth++; - for (cntr_info_1=0;cntr_info_1<*r->out.count;cntr_info_1++) { - char *idx_1=NULL; - if (asprintf(&idx_1, "[%d]", cntr_info_1) != -1) { - ndr_print_ptr(ndr, "info", r->out.info[cntr_info_1]); - ndr->depth++; - if (r->out.info[cntr_info_1]) { - ndr_print_set_switch_value(ndr, r->out.info[cntr_info_1], r->in.level); - ndr_print_spoolss_FormInfo(ndr, "info", r->out.info[cntr_info_1]); + if (*r->out.info) { + ndr->print(ndr, "%s: ARRAY(%d)", "info", (int)*r->out.count); + ndr->depth++; + for (cntr_info_2=0;cntr_info_2<*r->out.count;cntr_info_2++) { + char *idx_2=NULL; + if (asprintf(&idx_2, "[%d]", cntr_info_2) != -1) { + ndr_print_set_switch_value(ndr, &(*r->out.info)[cntr_info_2], r->in.level); + ndr_print_spoolss_FormInfo(ndr, "info", &(*r->out.info)[cntr_info_2]); + free(idx_2); } - ndr->depth--; - free(idx_1); } + ndr->depth--; } ndr->depth--; ndr->depth--; @@ -22402,7 +22402,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull___spoolss_EnumPorts(struct ndr_pull *ndr, in _PUBLIC_ void ndr_print_spoolss_EnumPorts(struct ndr_print *ndr, const char *name, int flags, const struct spoolss_EnumPorts *r) { - uint32_t cntr_info_1; + uint32_t cntr_info_2; ndr_print_struct(ndr, name, "spoolss_EnumPorts"); ndr->depth++; if (flags & NDR_SET_VALUES) { @@ -22436,20 +22436,20 @@ _PUBLIC_ void ndr_print_spoolss_EnumPorts(struct ndr_print *ndr, const char *nam ndr->depth--; ndr_print_ptr(ndr, "info", r->out.info); ndr->depth++; - ndr->print(ndr, "%s: ARRAY(%d)", "info", (int)*r->out.count); + ndr_print_ptr(ndr, "info", *r->out.info); ndr->depth++; - for (cntr_info_1=0;cntr_info_1<*r->out.count;cntr_info_1++) { - char *idx_1=NULL; - if (asprintf(&idx_1, "[%d]", cntr_info_1) != -1) { - ndr_print_ptr(ndr, "info", r->out.info[cntr_info_1]); - ndr->depth++; - if (r->out.info[cntr_info_1]) { - ndr_print_set_switch_value(ndr, r->out.info[cntr_info_1], r->in.level); - ndr_print_spoolss_PortInfo(ndr, "info", r->out.info[cntr_info_1]); + if (*r->out.info) { + ndr->print(ndr, "%s: ARRAY(%d)", "info", (int)*r->out.count); + ndr->depth++; + for (cntr_info_2=0;cntr_info_2<*r->out.count;cntr_info_2++) { + char *idx_2=NULL; + if (asprintf(&idx_2, "[%d]", cntr_info_2) != -1) { + ndr_print_set_switch_value(ndr, &(*r->out.info)[cntr_info_2], r->in.level); + ndr_print_spoolss_PortInfo(ndr, "info", &(*r->out.info)[cntr_info_2]); + free(idx_2); } - ndr->depth--; - free(idx_1); } + ndr->depth--; } ndr->depth--; ndr->depth--; @@ -22627,7 +22627,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull___spoolss_EnumMonitors(struct ndr_pull *ndr, _PUBLIC_ void ndr_print_spoolss_EnumMonitors(struct ndr_print *ndr, const char *name, int flags, const struct spoolss_EnumMonitors *r) { - uint32_t cntr_info_1; + uint32_t cntr_info_2; ndr_print_struct(ndr, name, "spoolss_EnumMonitors"); ndr->depth++; if (flags & NDR_SET_VALUES) { @@ -22661,20 +22661,20 @@ _PUBLIC_ void ndr_print_spoolss_EnumMonitors(struct ndr_print *ndr, const char * ndr->depth--; ndr_print_ptr(ndr, "info", r->out.info); ndr->depth++; - ndr->print(ndr, "%s: ARRAY(%d)", "info", (int)*r->out.count); + ndr_print_ptr(ndr, "info", *r->out.info); ndr->depth++; - for (cntr_info_1=0;cntr_info_1<*r->out.count;cntr_info_1++) { - char *idx_1=NULL; - if (asprintf(&idx_1, "[%d]", cntr_info_1) != -1) { - ndr_print_ptr(ndr, "info", r->out.info[cntr_info_1]); - ndr->depth++; - if (r->out.info[cntr_info_1]) { - ndr_print_set_switch_value(ndr, r->out.info[cntr_info_1], r->in.level); - ndr_print_spoolss_MonitorInfo(ndr, "info", r->out.info[cntr_info_1]); + if (*r->out.info) { + ndr->print(ndr, "%s: ARRAY(%d)", "info", (int)*r->out.count); + ndr->depth++; + for (cntr_info_2=0;cntr_info_2<*r->out.count;cntr_info_2++) { + char *idx_2=NULL; + if (asprintf(&idx_2, "[%d]", cntr_info_2) != -1) { + ndr_print_set_switch_value(ndr, &(*r->out.info)[cntr_info_2], r->in.level); + ndr_print_spoolss_MonitorInfo(ndr, "info", &(*r->out.info)[cntr_info_2]); + free(idx_2); } - ndr->depth--; - free(idx_1); } + ndr->depth--; } ndr->depth--; ndr->depth--; diff --git a/librpc/gen_ndr/spoolss.h b/librpc/gen_ndr/spoolss.h index d2ece73388..0b81146cff 100644 --- a/librpc/gen_ndr/spoolss.h +++ b/librpc/gen_ndr/spoolss.h @@ -1597,7 +1597,7 @@ struct spoolss_EnumPrinters { struct { uint32_t *count;/* [ref] */ - union spoolss_PrinterInfo **info;/* [ref,switch_is(level),size_is(*count)] */ + union spoolss_PrinterInfo **info;/* [ref,switch_is(level),size_is(,*count)] */ uint32_t *needed;/* [ref] */ WERROR result; } out; @@ -1699,7 +1699,7 @@ struct spoolss_EnumJobs { struct { uint32_t *count;/* [ref] */ - union spoolss_JobInfo **info;/* [ref,switch_is(level),size_is(*count)] */ + union spoolss_JobInfo **info;/* [ref,switch_is(level),size_is(,*count)] */ uint32_t *needed;/* [ref] */ WERROR result; } out; @@ -1816,7 +1816,7 @@ struct spoolss_EnumPrinterDrivers { struct { uint32_t *count;/* [ref] */ - union spoolss_DriverInfo **info;/* [ref,switch_is(level),size_is(*count)] */ + union spoolss_DriverInfo **info;/* [ref,switch_is(level),size_is(,*count)] */ uint32_t *needed;/* [ref] */ WERROR result; } out; @@ -1922,7 +1922,7 @@ struct spoolss_EnumPrintProcessors { struct { uint32_t *count;/* [ref] */ - union spoolss_PrintProcessorInfo **info;/* [ref,switch_is(level),size_is(*count)] */ + union spoolss_PrintProcessorInfo **info;/* [ref,switch_is(level),size_is(,*count)] */ uint32_t *needed;/* [ref] */ WERROR result; } out; @@ -2283,7 +2283,7 @@ struct spoolss_EnumForms { struct { uint32_t *count;/* [ref] */ - union spoolss_FormInfo **info;/* [ref,switch_is(level),size_is(*count)] */ + union spoolss_FormInfo **info;/* [ref,switch_is(level),size_is(,*count)] */ uint32_t *needed;/* [ref] */ WERROR result; } out; @@ -2332,7 +2332,7 @@ struct spoolss_EnumPorts { struct { uint32_t *count;/* [ref] */ - union spoolss_PortInfo **info;/* [ref,switch_is(level),size_is(*count)] */ + union spoolss_PortInfo **info;/* [ref,switch_is(level),size_is(,*count)] */ uint32_t *needed;/* [ref] */ WERROR result; } out; @@ -2381,7 +2381,7 @@ struct spoolss_EnumMonitors { struct { uint32_t *count;/* [ref] */ - union spoolss_MonitorInfo **info;/* [ref,switch_is(level),size_is(*count)] */ + union spoolss_MonitorInfo **info;/* [ref,switch_is(level),size_is(,*count)] */ uint32_t *needed;/* [ref] */ WERROR result; } out; diff --git a/librpc/gen_ndr/srv_spoolss.c b/librpc/gen_ndr/srv_spoolss.c index c0d6ca3ca2..72a9f3187b 100644 --- a/librpc/gen_ndr/srv_spoolss.c +++ b/librpc/gen_ndr/srv_spoolss.c @@ -51,7 +51,7 @@ static bool api_spoolss_EnumPrinters(pipes_struct *p) return false; } - r->out.info = talloc_zero_array(r, union spoolss_PrinterInfo *, *r->out.count); + r->out.info = talloc_zero(r, union spoolss_PrinterInfo *); if (r->out.info == NULL) { talloc_free(r); return false; @@ -382,7 +382,7 @@ static bool api_spoolss_EnumJobs(pipes_struct *p) return false; } - r->out.info = talloc_zero_array(r, union spoolss_JobInfo *, *r->out.count); + r->out.info = talloc_zero(r, union spoolss_JobInfo *); if (r->out.info == NULL) { talloc_free(r); return false; @@ -852,7 +852,7 @@ static bool api_spoolss_EnumPrinterDrivers(pipes_struct *p) return false; } - r->out.info = talloc_zero_array(r, union spoolss_DriverInfo *, *r->out.count); + r->out.info = talloc_zero(r, union spoolss_DriverInfo *); if (r->out.info == NULL) { talloc_free(r); return false; @@ -1249,7 +1249,7 @@ static bool api_spoolss_EnumPrintProcessors(pipes_struct *p) return false; } - r->out.info = talloc_zero_array(r, union spoolss_PrintProcessorInfo *, *r->out.count); + r->out.info = talloc_zero(r, union spoolss_PrintProcessorInfo *); if (r->out.info == NULL) { talloc_free(r); return false; @@ -2731,7 +2731,7 @@ static bool api_spoolss_EnumForms(pipes_struct *p) return false; } - r->out.info = talloc_zero_array(r, union spoolss_FormInfo *, *r->out.count); + r->out.info = talloc_zero(r, union spoolss_FormInfo *); if (r->out.info == NULL) { talloc_free(r); return false; @@ -2823,7 +2823,7 @@ static bool api_spoolss_EnumPorts(pipes_struct *p) return false; } - r->out.info = talloc_zero_array(r, union spoolss_PortInfo *, *r->out.count); + r->out.info = talloc_zero(r, union spoolss_PortInfo *); if (r->out.info == NULL) { talloc_free(r); return false; @@ -2915,7 +2915,7 @@ static bool api_spoolss_EnumMonitors(pipes_struct *p) return false; } - r->out.info = talloc_zero_array(r, union spoolss_MonitorInfo *, *r->out.count); + r->out.info = talloc_zero(r, union spoolss_MonitorInfo *); if (r->out.info == NULL) { talloc_free(r); return false; @@ -7551,7 +7551,7 @@ NTSTATUS rpc_spoolss_dispatch(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, return NT_STATUS_NO_MEMORY; } - r->out.info = talloc_zero_array(mem_ctx, union spoolss_PrinterInfo *, *r->out.count); + r->out.info = talloc_zero(mem_ctx, union spoolss_PrinterInfo *); if (r->out.info == NULL) { return NT_STATUS_NO_MEMORY; } @@ -7608,7 +7608,7 @@ NTSTATUS rpc_spoolss_dispatch(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, return NT_STATUS_NO_MEMORY; } - r->out.info = talloc_zero_array(mem_ctx, union spoolss_JobInfo *, *r->out.count); + r->out.info = talloc_zero(mem_ctx, union spoolss_JobInfo *); if (r->out.info == NULL) { return NT_STATUS_NO_MEMORY; } @@ -7671,7 +7671,7 @@ NTSTATUS rpc_spoolss_dispatch(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, return NT_STATUS_NO_MEMORY; } - r->out.info = talloc_zero_array(mem_ctx, union spoolss_DriverInfo *, *r->out.count); + r->out.info = talloc_zero(mem_ctx, union spoolss_DriverInfo *); if (r->out.info == NULL) { return NT_STATUS_NO_MEMORY; } @@ -7728,7 +7728,7 @@ NTSTATUS rpc_spoolss_dispatch(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, return NT_STATUS_NO_MEMORY; } - r->out.info = talloc_zero_array(mem_ctx, union spoolss_PrintProcessorInfo *, *r->out.count); + r->out.info = talloc_zero(mem_ctx, union spoolss_PrintProcessorInfo *); if (r->out.info == NULL) { return NT_STATUS_NO_MEMORY; } @@ -7923,7 +7923,7 @@ NTSTATUS rpc_spoolss_dispatch(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, return NT_STATUS_NO_MEMORY; } - r->out.info = talloc_zero_array(mem_ctx, union spoolss_FormInfo *, *r->out.count); + r->out.info = talloc_zero(mem_ctx, union spoolss_FormInfo *); if (r->out.info == NULL) { return NT_STATUS_NO_MEMORY; } @@ -7945,7 +7945,7 @@ NTSTATUS rpc_spoolss_dispatch(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, return NT_STATUS_NO_MEMORY; } - r->out.info = talloc_zero_array(mem_ctx, union spoolss_PortInfo *, *r->out.count); + r->out.info = talloc_zero(mem_ctx, union spoolss_PortInfo *); if (r->out.info == NULL) { return NT_STATUS_NO_MEMORY; } @@ -7967,7 +7967,7 @@ NTSTATUS rpc_spoolss_dispatch(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, return NT_STATUS_NO_MEMORY; } - r->out.info = talloc_zero_array(mem_ctx, union spoolss_MonitorInfo *, *r->out.count); + r->out.info = talloc_zero(mem_ctx, union spoolss_MonitorInfo *); if (r->out.info == NULL) { return NT_STATUS_NO_MEMORY; } |