summaryrefslogtreecommitdiff
path: root/source3/rpcclient/rpcclient.c
diff options
context:
space:
mode:
authorLuke Leighton <lkcl@samba.org>1999-11-09 19:35:30 +0000
committerLuke Leighton <lkcl@samba.org>1999-11-09 19:35:30 +0000
commit826ad16b363accc4029178cf9087b02362245e11 (patch)
treee97642e777c4843139b99258ea6885101b3633be /source3/rpcclient/rpcclient.c
parent97398b4c7433b449b074373a7f552c58854c7a49 (diff)
downloadsamba-826ad16b363accc4029178cf9087b02362245e11.tar.gz
samba-826ad16b363accc4029178cf9087b02362245e11.tar.bz2
samba-826ad16b363accc4029178cf9087b02362245e11.zip
debugging rpcclient spoolenum and spooljobs commands. oh, did i forget
to mention, there's a spooljobs <printer name> command, and it uses command-line completion? prints out NT print jobs really nicely, too. (This used to be commit e6e5caf16c8d120f0c11fa63061f2786098e3357)
Diffstat (limited to 'source3/rpcclient/rpcclient.c')
-rw-r--r--source3/rpcclient/rpcclient.c17
1 files changed, 14 insertions, 3 deletions
diff --git a/source3/rpcclient/rpcclient.c b/source3/rpcclient/rpcclient.c
index e465a63767..06e6d0c089 100644
--- a/source3/rpcclient/rpcclient.c
+++ b/source3/rpcclient/rpcclient.c
@@ -239,10 +239,16 @@ commands[] =
{
"spoolenum",
cmd_spoolss_enum_printers,
- "Spool Printer Enum Test",
+ "Enumerate Printers",
{COMPL_NONE, COMPL_NONE}
},
{
+ "spooljobs",
+ cmd_spoolss_enum_jobs,
+ "<printer name> Enumerate Printer Jobs",
+ {COMPL_PRTLST, COMPL_NONE}
+ },
+ {
"spoolopen",
cmd_spoolss_open_printer_ex,
"<printer name> Spool Printer Open Test",
@@ -1152,13 +1158,18 @@ static char *complete_printersenum(char *text, int state)
if (state == 0)
{
+ fstring srv_name;
+ fstrcpy(srv_name, "\\\\");
+ fstrcat(srv_name, smb_cli->desthost);
+ strupper(srv_name);
+
free_print1_array(num, ctr);
ctr = NULL;
num = 0;
/* Iterate all users */
- if (!msrpc_spoolss_enum_printers(smb_cli, 1, &num,
- (void***)&ctr,
+ if (!msrpc_spoolss_enum_printers(smb_cli, srv_name,
+ 1, &num, (void***)&ctr,
NULL))
{
return NULL;