summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGerald Carter <jerry@samba.org>2000-08-10 14:05:19 +0000
committerGerald Carter <jerry@samba.org>2000-08-10 14:05:19 +0000
commit536a055a9a7c6c43cd24477319f5851fb83dcb5d (patch)
tree018ebc63472d439830d8e1b07794ea353f736981
parent7ce5aacf7e18a61baff14ada94cb626acb446426 (diff)
downloadsamba-536a055a9a7c6c43cd24477319f5851fb83dcb5d.tar.gz
samba-536a055a9a7c6c43cd24477319f5851fb83dcb5d.tar.bz2
samba-536a055a9a7c6c43cd24477319f5851fb83dcb5d.zip
Working on spoolss_getprinterdriver() as it does not display all the
dependentfiles. jery (This used to be commit 206565368b887ba83791efe018f24175e6f31137)
-rw-r--r--source3/rpcclient/cmd_spoolss.c6
-rw-r--r--source3/rpcclient/display_spool.c21
2 files changed, 21 insertions, 6 deletions
diff --git a/source3/rpcclient/cmd_spoolss.c b/source3/rpcclient/cmd_spoolss.c
index 6cec9ae1cd..2bf59bc4a1 100644
--- a/source3/rpcclient/cmd_spoolss.c
+++ b/source3/rpcclient/cmd_spoolss.c
@@ -736,6 +736,12 @@ uint32 cmd_spoolss_addprinterdriver(struct client_info *info, int argc, char *ar
report( out_hnd, "spoolss_addprinterdriver: Add Printer failed [%d]\n",
result);
}
+ else
+ {
+ fstring driver_name;
+ unistr_to_ascii (driver_name, info3.name.buffer, sizeof(driver_name)-1);
+ report( out_hnd, "cmd_spoolss_addprinterdriver: Printer Driver [%s] added successfully\n", driver_name);
+ }
free_drv_info_3(&info3);
diff --git a/source3/rpcclient/display_spool.c b/source3/rpcclient/display_spool.c
index 1a88eed5ad..54162a99b7 100644
--- a/source3/rpcclient/display_spool.c
+++ b/source3/rpcclient/display_spool.c
@@ -737,7 +737,8 @@ static void display_print_driver_3(FILE *out_hnd, DRIVER_INFO_3 *i1)
fstring monitorname;
fstring defaultdatatype;
- int longueur=0;
+ int length=0;
+ BOOL valid = True;
if (i1 == NULL)
return;
@@ -760,12 +761,20 @@ static void display_print_driver_3(FILE *out_hnd, DRIVER_INFO_3 *i1)
report(out_hnd, "\tconfigfile:[%s]\n", configfile);
report(out_hnd, "\thelpfile:[%s]\n\n", helpfile);
- do {
- unistr_to_ascii(dependentfiles, i1->dependentfiles+longueur, sizeof(dependentfiles)-1);
- longueur+=strlen(dependentfiles)+1;
+ while (valid)
+ {
+ unistr_to_ascii(dependentfiles, i1->dependentfiles+length, sizeof(dependentfiles)-1);
+ length+=strlen(dependentfiles)+1;
- report(out_hnd, "\tdependentfiles:[%s]\n", dependentfiles);
- } while (dependentfiles[0]!='\0');
+ if (strlen(dependentfiles) > 0)
+ {
+ report(out_hnd, "\tdependentfiles:[%s]\n", dependentfiles);
+ }
+ else
+ {
+ valid = False;
+ }
+ }
report(out_hnd, "\n\tmonitorname:[%s]\n", monitorname);
report(out_hnd, "\tdefaultdatatype:[%s]\n", defaultdatatype);