summaryrefslogtreecommitdiff
path: root/source3/rpcclient/display_spool.c
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 /source3/rpcclient/display_spool.c
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)
Diffstat (limited to 'source3/rpcclient/display_spool.c')
-rw-r--r--source3/rpcclient/display_spool.c21
1 files changed, 15 insertions, 6 deletions
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);