summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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);