diff options
author | Tim Potter <tpot@samba.org> | 2002-08-27 00:38:55 +0000 |
---|---|---|
committer | Tim Potter <tpot@samba.org> | 2002-08-27 00:38:55 +0000 |
commit | 83c598588017c2d0d71ab44cb3f319d11a7f600e (patch) | |
tree | 9267b0ba3fd79e5f49d170016f9ae3b2f2c452c5 /source3/rpc_client | |
parent | dc40c5fb2dd21adc4939d30679e68ef845c633c1 (diff) | |
download | samba-83c598588017c2d0d71ab44cb3f319d11a7f600e.tar.gz samba-83c598588017c2d0d71ab44cb3f319d11a7f600e.tar.bz2 samba-83c598588017c2d0d71ab44cb3f319d11a7f600e.zip |
Pass the object name down to the enum_printers rpc. By default this is the
server name and everything works as advertised. See the MSDN doco for details.
(This used to be commit d6b10fe9691bfc96d5933c029990c60fd292bdc9)
Diffstat (limited to 'source3/rpc_client')
-rw-r--r-- | source3/rpc_client/cli_spoolss.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/source3/rpc_client/cli_spoolss.c b/source3/rpc_client/cli_spoolss.c index 18e17758d6..0a869e45a2 100644 --- a/source3/rpc_client/cli_spoolss.c +++ b/source3/rpc_client/cli_spoolss.c @@ -393,7 +393,7 @@ WERROR cli_spoolss_close_printer(struct cli_state *cli, TALLOC_CTX *mem_ctx, WERROR cli_spoolss_enum_printers(struct cli_state *cli, TALLOC_CTX *mem_ctx, uint32 offered, uint32 *needed, - uint32 flags, uint32 level, + char *name, uint32 flags, uint32 level, uint32 *num_printers, PRINTER_INFO_CTR *ctr) { prs_struct qbuf, rbuf; @@ -406,7 +406,13 @@ WERROR cli_spoolss_enum_printers(struct cli_state *cli, TALLOC_CTX *mem_ctx, ZERO_STRUCT(q); ZERO_STRUCT(r); - slprintf (server, sizeof(fstring)-1, "\\\\%s", cli->desthost); + /* Use server name if no object name specified */ + + if (name) + slprintf(server, sizeof(fstring) - 1, "\\\\%s", name); + else + slprintf(server, sizeof(fstring) - 1, "\\\\%s", cli->desthost); + strupper (server); /* Initialise input parameters */ |