[SCM] Samba Shared Repository - branch master updated - release-4-0-0alpha7-185-gb4707d8

Günther Deschner gd at samba.org
Fri Mar 6 13:29:27 GMT 2009


The branch, master has been updated
       via  b4707d8df34d3c1e28270e0c054bcf6b8c3758b5 (commit)
       via  75046db121ea858fcc22da7b4410aea9eea70e67 (commit)
       via  007f3f231914eaa3fe9ce83c95e0db49d67151d2 (commit)
       via  8bc7bb77bebcac9b10f2718f879d92813fe275da (commit)
       via  2fcc921237bbaac2de331ee53828ab72394a6186 (commit)
       via  8e68eb2cc36c493461c74ee35b0974832d6452c3 (commit)
       via  47adaea11e553f30a43ad1dd9ac700a510c9e909 (commit)
       via  c6aea64e9223f89691e401c08ef82173c55883db (commit)
       via  4941e80d0ec0ca61a0edaff15edeb2d58b5be769 (commit)
       via  fb4ab25eec7d5d2645d3f3d2a6d676e48c0e6284 (commit)
      from  df145c33822f1fc77e2602709a75c2eac71abab3 (commit)

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -----------------------------------------------------------------
commit b4707d8df34d3c1e28270e0c054bcf6b8c3758b5
Author: Günther Deschner <gd at samba.org>
Date:   Fri Mar 6 14:23:44 2009 +0100

    s3: re-run make samba3-idl.
    
    Guenther

commit 75046db121ea858fcc22da7b4410aea9eea70e67
Author: Günther Deschner <gd at samba.org>
Date:   Thu Mar 5 18:35:47 2009 +0100

    spoolss: fix [size_is] declaration for enum calls.
    
    This took me ages to find. Thanks metze!
    
    Guenther

commit 007f3f231914eaa3fe9ce83c95e0db49d67151d2
Author: Günther Deschner <gd at samba.org>
Date:   Mon Mar 2 18:02:04 2009 +0100

    s4-spoolss: fix spoolss server enum calls after pointer changes.
    
    Guenther

commit 8bc7bb77bebcac9b10f2718f879d92813fe275da
Author: Günther Deschner <gd at samba.org>
Date:   Fri Mar 6 12:24:23 2009 +0100

    s4-smbtorture: exit early in test_EnumPorts when no port info has been returned.
    
    Guenther

commit 2fcc921237bbaac2de331ee53828ab72394a6186
Author: Günther Deschner <gd at samba.org>
Date:   Fri Mar 6 12:20:14 2009 +0100

    s4-smbtorture: fix s3 flavor rpc spoolss test.
    
    Guenther

commit 8e68eb2cc36c493461c74ee35b0974832d6452c3
Author: Günther Deschner <gd at samba.org>
Date:   Mon Mar 2 17:58:13 2009 +0100

    s4-smbtorture: fix RPC-SPOOLSS-WIN.
    
    Guenther

commit 47adaea11e553f30a43ad1dd9ac700a510c9e909
Author: Günther Deschner <gd at samba.org>
Date:   Mon Mar 2 17:32:24 2009 +0100

    s4-smbtorture: fix RPC-SPOOLSS test after enum out info pointer changes.
    
    Guenther

commit c6aea64e9223f89691e401c08ef82173c55883db
Author: Günther Deschner <gd at samba.org>
Date:   Fri Mar 6 13:52:39 2009 +0100

    spoolss: fix spoolss enum calls helper macro code after pointer changes.
    
    Guenther

commit 4941e80d0ec0ca61a0edaff15edeb2d58b5be769
Author: Günther Deschner <gd at samba.org>
Date:   Mon Mar 2 17:31:29 2009 +0100

    s3: re-run make samba3-idl.
    
    Guenther

commit fb4ab25eec7d5d2645d3f3d2a6d676e48c0e6284
Author: Günther Deschner <gd at samba.org>
Date:   Mon Mar 2 17:29:15 2009 +0100

    spoolss: make all enum out info pointers a pointer to an array.
    
    Without this we never can get a reasonable s3 cli_spoolss fn for the enum calls.
    
    Guenther

-----------------------------------------------------------------------

Summary of changes:
 librpc/gen_ndr/cli_spoolss.c                |   42 +++------
 librpc/gen_ndr/cli_spoolss.h                |   14 ++--
 librpc/gen_ndr/ndr_spoolss.c                |  133 +++++++++++++++-----------
 librpc/gen_ndr/spoolss.h                    |   14 ++--
 librpc/gen_ndr/srv_spoolss.c                |   28 +++---
 librpc/idl/spoolss.idl                      |   14 ++--
 librpc/ndr/ndr_spoolss_buf.c                |   19 +++-
 source4/ntptr/simple_ldb/ntptr_simple_ldb.c |    8 +-
 source4/rpc_server/spoolss/dcesrv_spoolss.c |   20 ++--
 source4/torture/rpc/samba3rpc.c             |    2 +
 source4/torture/rpc/spoolss.c               |   50 +++++++----
 source4/torture/rpc/spoolss_win.c           |    8 ++-
 12 files changed, 194 insertions(+), 158 deletions(-)


Changeset truncated at 500 lines:

diff --git a/librpc/gen_ndr/cli_spoolss.c b/librpc/gen_ndr/cli_spoolss.c
index 2aa42b9..87e305f 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] [unique,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,9 +52,7 @@ NTSTATUS rpccli_spoolss_EnumPrinters(struct rpc_pipe_client *cli,
 
 	/* Return variables */
 	*count = *r.out.count;
-	if (info && r.out.info) {
-		memcpy(info, r.out.info, *count * sizeof(*info));
-	}
+	*info = *r.out.info;
 	*needed = *r.out.needed;
 
 	/* Return result */
@@ -231,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] [unique,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)
 {
@@ -270,9 +268,7 @@ NTSTATUS rpccli_spoolss_EnumJobs(struct rpc_pipe_client *cli,
 
 	/* Return variables */
 	*count = *r.out.count;
-	if (info && r.out.info) {
-		memcpy(info, r.out.info, *count * sizeof(*info));
-	}
+	*info = *r.out.info;
 	*needed = *r.out.needed;
 
 	/* Return result */
@@ -526,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] [unique,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)
 {
@@ -564,9 +560,7 @@ NTSTATUS rpccli_spoolss_EnumPrinterDrivers(struct rpc_pipe_client *cli,
 
 	/* Return variables */
 	*count = *r.out.count;
-	if (info && r.out.info) {
-		memcpy(info, r.out.info, *count * sizeof(*info));
-	}
+	*info = *r.out.info;
 	*needed = *r.out.needed;
 
 	/* Return result */
@@ -779,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] [unique,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)
 {
@@ -817,9 +811,7 @@ NTSTATUS rpccli_spoolss_EnumPrintProcessors(struct rpc_pipe_client *cli,
 
 	/* Return variables */
 	*count = *r.out.count;
-	if (info && r.out.info) {
-		memcpy(info, r.out.info, *count * sizeof(*info));
-	}
+	*info = *r.out.info;
 	*needed = *r.out.needed;
 
 	/* Return result */
@@ -1699,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] [unique,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)
 {
@@ -1736,9 +1728,7 @@ NTSTATUS rpccli_spoolss_EnumForms(struct rpc_pipe_client *cli,
 
 	/* Return variables */
 	*count = *r.out.count;
-	if (info && r.out.info) {
-		memcpy(info, r.out.info, *count * sizeof(*info));
-	}
+	*info = *r.out.info;
 	*needed = *r.out.needed;
 
 	/* Return result */
@@ -1756,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] [unique,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)
 {
@@ -1793,9 +1783,7 @@ NTSTATUS rpccli_spoolss_EnumPorts(struct rpc_pipe_client *cli,
 
 	/* Return variables */
 	*count = *r.out.count;
-	if (info && r.out.info) {
-		memcpy(info, r.out.info, *count * sizeof(*info));
-	}
+	*info = *r.out.info;
 	*needed = *r.out.needed;
 
 	/* Return result */
@@ -1813,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] [unique,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)
 {
@@ -1850,9 +1838,7 @@ NTSTATUS rpccli_spoolss_EnumMonitors(struct rpc_pipe_client *cli,
 
 	/* Return variables */
 	*count = *r.out.count;
-	if (info && r.out.info) {
-		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 83b2e28..ba766d9 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] [unique,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] [unique,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] [unique,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] [unique,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] [unique,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] [unique,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] [unique,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 f82f42e..576965b 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,23 @@ _PUBLIC_ void ndr_print_spoolss_EnumPrinters(struct ndr_print *ndr, const char *
 		ndr->depth--;
 		ndr_print_ptr(ndr, "info", r->out.info);
 		ndr->depth++;
-		if (r->out.info) {
+		ndr_print_ptr(ndr, "info", *r->out.info);
+		ndr->depth++;
+		if (*r->out.info) {
 			ndr->print(ndr, "%s: ARRAY(%d)", "info", (int)*r->out.count);
 			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_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]);
-					free(idx_1);
+			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--;
 		}
 		ndr->depth--;
+		ndr->depth--;
 		ndr_print_ptr(ndr, "needed", r->out.needed);
 		ndr->depth++;
 		ndr_print_uint32(ndr, "needed", *r->out.needed);
@@ -18953,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) {
@@ -18987,20 +18990,23 @@ _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++;
-		if (r->out.info) {
+		ndr_print_ptr(ndr, "info", *r->out.info);
+		ndr->depth++;
+		if (*r->out.info) {
 			ndr->print(ndr, "%s: ARRAY(%d)", "info", (int)*r->out.count);
 			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_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]);
-					free(idx_1);
+			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--;
 		}
 		ndr->depth--;
+		ndr->depth--;
 		ndr_print_ptr(ndr, "needed", r->out.needed);
 		ndr->depth++;
 		ndr_print_uint32(ndr, "needed", *r->out.needed);
@@ -19642,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) {
@@ -19682,20 +19688,23 @@ _PUBLIC_ void ndr_print_spoolss_EnumPrinterDrivers(struct ndr_print *ndr, const
 		ndr->depth--;
 		ndr_print_ptr(ndr, "info", r->out.info);
 		ndr->depth++;
-		if (r->out.info) {
+		ndr_print_ptr(ndr, "info", *r->out.info);
+		ndr->depth++;
+		if (*r->out.info) {
 			ndr->print(ndr, "%s: ARRAY(%d)", "info", (int)*r->out.count);
 			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_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]);
-					free(idx_1);
+			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--;
 		}
 		ndr->depth--;
+		ndr->depth--;
 		ndr_print_ptr(ndr, "needed", r->out.needed);
 		ndr->depth++;
 		ndr_print_uint32(ndr, "needed", *r->out.needed);
@@ -20340,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) {
@@ -20380,20 +20389,23 @@ _PUBLIC_ void ndr_print_spoolss_EnumPrintProcessors(struct ndr_print *ndr, const
 		ndr->depth--;
 		ndr_print_ptr(ndr, "info", r->out.info);
 		ndr->depth++;
-		if (r->out.info) {
+		ndr_print_ptr(ndr, "info", *r->out.info);
+		ndr->depth++;
+		if (*r->out.info) {
 			ndr->print(ndr, "%s: ARRAY(%d)", "info", (int)*r->out.count);
 			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_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]);
-					free(idx_1);
+			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--;
 		}
 		ndr->depth--;
+		ndr->depth--;
 		ndr_print_ptr(ndr, "needed", r->out.needed);
 		ndr->depth++;
 		ndr_print_uint32(ndr, "needed", *r->out.needed);
@@ -22167,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) {
@@ -22199,20 +22211,23 @@ _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++;
-		if (r->out.info) {
+		ndr_print_ptr(ndr, "info", *r->out.info);
+		ndr->depth++;
+		if (*r->out.info) {
 			ndr->print(ndr, "%s: ARRAY(%d)", "info", (int)*r->out.count);
 			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_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]);
-					free(idx_1);
+			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--;
 		}
 		ndr->depth--;
+		ndr->depth--;
 		ndr_print_ptr(ndr, "needed", r->out.needed);
 		ndr->depth++;
 		ndr_print_uint32(ndr, "needed", *r->out.needed);
@@ -22387,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) {
@@ -22421,20 +22436,23 @@ _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++;
-		if (r->out.info) {
+		ndr_print_ptr(ndr, "info", *r->out.info);
+		ndr->depth++;
+		if (*r->out.info) {
 			ndr->print(ndr, "%s: ARRAY(%d)", "info", (int)*r->out.count);
 			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_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]);
-					free(idx_1);
+			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--;
 		}
 		ndr->depth--;
+		ndr->depth--;
 		ndr_print_ptr(ndr, "needed", r->out.needed);
 		ndr->depth++;
 		ndr_print_uint32(ndr, "needed", *r->out.needed);
@@ -22609,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) {
@@ -22643,20 +22661,23 @@ _PUBLIC_ void ndr_print_spoolss_EnumMonitors(struct ndr_print *ndr, const char *
 		ndr->depth--;
 		ndr_print_ptr(ndr, "info", r->out.info);
 		ndr->depth++;
-		if (r->out.info) {
+		ndr_print_ptr(ndr, "info", *r->out.info);
+		ndr->depth++;
+		if (*r->out.info) {
 			ndr->print(ndr, "%s: ARRAY(%d)", "info", (int)*r->out.count);
 			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_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]);
-					free(idx_1);
+			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--;
 		}
 		ndr->depth--;
+		ndr->depth--;
 		ndr_print_ptr(ndr, "needed", r->out.needed);
 		ndr->depth++;
 		ndr_print_uint32(ndr, "needed", *r->out.needed);
diff --git a/librpc/gen_ndr/spoolss.h b/librpc/gen_ndr/spoolss.h
index 9c5496e..0b81146 100644
--- a/librpc/gen_ndr/spoolss.h
+++ b/librpc/gen_ndr/spoolss.h
@@ -1597,7 +1597,7 @@ struct spoolss_EnumPrinters {


-- 
Samba Shared Repository


More information about the samba-cvs mailing list