summaryrefslogtreecommitdiff
path: root/source3/rpc_client
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2004-08-25 21:26:37 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 10:52:30 -0500
commitbf645415f6a611d71eb07e9ebd9f005a02720a6d (patch)
treebe5bd11cbd4dd1ca51096f804e263a260bb4e108 /source3/rpc_client
parent804cfb20a067b4b687089dc72a8271b3abf20f31 (diff)
downloadsamba-bf645415f6a611d71eb07e9ebd9f005a02720a6d.tar.gz
samba-bf645415f6a611d71eb07e9ebd9f005a02720a6d.tar.bz2
samba-bf645415f6a611d71eb07e9ebd9f005a02720a6d.zip
r2073: Adding getprinter level 7 to rpcclient.
Is there any other rpc-call to get the guid of a published printer? Guenther (This used to be commit 944ad569c7a88e1d2f14311eed10f80ea9861963)
Diffstat (limited to 'source3/rpc_client')
-rw-r--r--source3/rpc_client/cli_spoolss.c24
1 files changed, 24 insertions, 0 deletions
diff --git a/source3/rpc_client/cli_spoolss.c b/source3/rpc_client/cli_spoolss.c
index 8f5f2413de..5303f83bf9 100644
--- a/source3/rpc_client/cli_spoolss.c
+++ b/source3/rpc_client/cli_spoolss.c
@@ -132,6 +132,27 @@ static void decode_printer_info_3(TALLOC_CTX *mem_ctx, NEW_BUFFER *buffer,
/**********************************************************************
**********************************************************************/
+static void decode_printer_info_7(TALLOC_CTX *mem_ctx, NEW_BUFFER *buffer,
+ uint32 returned, PRINTER_INFO_7 **info)
+{
+ uint32 i;
+ PRINTER_INFO_7 *inf;
+
+ inf=(PRINTER_INFO_7 *)talloc(mem_ctx, returned*sizeof(PRINTER_INFO_7));
+ memset(inf, 0, returned*sizeof(PRINTER_INFO_7));
+
+ prs_set_offset(&buffer->prs,0);
+
+ for (i=0; i<returned; i++) {
+ smb_io_printer_info_7("", buffer, &inf[i], 0);
+ }
+
+ *info=inf;
+}
+
+
+/**********************************************************************
+**********************************************************************/
static void decode_port_info_1(TALLOC_CTX *mem_ctx, NEW_BUFFER *buffer,
uint32 returned, PORT_INFO_1 **info)
{
@@ -626,6 +647,9 @@ WERROR cli_spoolss_getprinter(struct cli_state *cli, TALLOC_CTX *mem_ctx,
case 3:
decode_printer_info_3(mem_ctx, r.buffer, 1, &ctr->printers_3);
break;
+ case 7:
+ decode_printer_info_7(mem_ctx, r.buffer, 1, &ctr->printers_7);
+ break;
}
}