svn commit: samba r23431 - in branches/SAMBA_3_0_26/source/rpcclient: .

obnox at samba.org obnox at samba.org
Tue Jun 12 10:57:09 GMT 2007


Author: obnox
Date: 2007-06-12 10:57:08 +0000 (Tue, 12 Jun 2007)
New Revision: 23431

WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=23431

Log:
Merge rpcclient/cmd_spoolss.c portion of r16945 and r19811.

Michael


Modified:
   branches/SAMBA_3_0_26/source/rpcclient/cmd_spoolss.c


Changeset:
Modified: branches/SAMBA_3_0_26/source/rpcclient/cmd_spoolss.c
===================================================================
--- branches/SAMBA_3_0_26/source/rpcclient/cmd_spoolss.c	2007-06-12 10:31:48 UTC (rev 23430)
+++ branches/SAMBA_3_0_26/source/rpcclient/cmd_spoolss.c	2007-06-12 10:57:08 UTC (rev 23431)
@@ -707,17 +707,23 @@
 		break;
 	}
 	case REG_MULTI_SZ: {
-		uint16 *curstr = (uint16 *) value.data_p;
-		uint8 *start = value.data_p;
-		printf("%s: REG_MULTI_SZ:\n", value.valuename);
-		while (((uint8 *) curstr < start + value.size)) {
-			rpcstr_pull(text, curstr, sizeof(text), -1, 
-				    STR_TERMINATE);
-			printf("  %s\n", *text != 0 ? text : "NULL");
-			curstr += strlen(text) + 1;
+		uint32 i, num_values;
+		char **values;
+
+		if (!NT_STATUS_IS_OK(reg_pull_multi_sz(NULL, value.data_p,
+						       value.size,
+						       &num_values,
+						       &values))) {
+			d_printf("reg_pull_multi_sz failed\n");
+			break;
 		}
+
+		for (i=0; i<num_values; i++) {
+			d_printf("%s\n", values[i]);
+		}
+		TALLOC_FREE(values);
+		break;
 	}
-	break;
 	default:
 		printf("%s: unknown type %d\n", value.valuename, value.type);
 	}



More information about the samba-cvs mailing list