diff options
author | Gerald Carter <jerry@samba.org> | 2000-08-10 14:05:19 +0000 |
---|---|---|
committer | Gerald Carter <jerry@samba.org> | 2000-08-10 14:05:19 +0000 |
commit | 206565368b887ba83791efe018f24175e6f31137 (patch) | |
tree | 4cae1dbdb7136cf9afcc115fc743d835cf534e82 /source/rpcclient | |
parent | 1a145977f09654fc51ebcd40ef7a2aa69aa96cfb (diff) | |
download | samba-206565368b887ba83791efe018f24175e6f31137.tar.gz |
Working on spoolss_getprinterdriver() as it does not display all the
dependentfiles.
jery
Diffstat (limited to 'source/rpcclient')
-rw-r--r-- | source/rpcclient/cmd_spoolss.c | 6 | ||||
-rw-r--r-- | source/rpcclient/display_spool.c | 21 |
2 files changed, 21 insertions, 6 deletions
diff --git a/source/rpcclient/cmd_spoolss.c b/source/rpcclient/cmd_spoolss.c index 6cec9ae1cd2..2bf59bc4a13 100644 --- a/source/rpcclient/cmd_spoolss.c +++ b/source/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/source/rpcclient/display_spool.c b/source/rpcclient/display_spool.c index 1a88eed5ad3..54162a99b73 100644 --- a/source/rpcclient/display_spool.c +++ b/source/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); |