mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-01-26 09:42:25 +00:00
Anecdotal evidence suggests that a single EnumPrinters() call
specifying both PRINTER_ENUM_LOCAL and PRINTER_ENUM_CONNECTIONS catches more printers in some circumstances than two EnumPrinters() calls each specifying just one of them. We'll try it for a bit; if it goes wrong I might have to put back the two original calls as well and sort out some means of removing duplicate printers from the list. [originally from svn r1829]
This commit is contained in:
parent
1601559c8c
commit
554f9f130a
10
printing.c
10
printing.c
@ -65,14 +65,8 @@ printer_enum *printer_start_enum(int *nprinters_ptr)
|
|||||||
*nprinters_ptr = 0; /* default return value */
|
*nprinters_ptr = 0; /* default return value */
|
||||||
buffer = smalloc(512);
|
buffer = smalloc(512);
|
||||||
|
|
||||||
retval = printer_add_enum(PRINTER_ENUM_LOCAL, buffer, 0, nprinters_ptr);
|
retval = printer_add_enum(PRINTER_ENUM_LOCAL | PRINTER_ENUM_CONNECTIONS,
|
||||||
if (!retval)
|
buffer, 0, nprinters_ptr);
|
||||||
goto error;
|
|
||||||
else
|
|
||||||
buffer = retval;
|
|
||||||
retval = printer_add_enum(PRINTER_ENUM_CONNECTIONS, buffer,
|
|
||||||
sizeof(ENUM_TYPE) * *nprinters_ptr,
|
|
||||||
nprinters_ptr);
|
|
||||||
if (!retval)
|
if (!retval)
|
||||||
goto error;
|
goto error;
|
||||||
else
|
else
|
||||||
|
Loading…
Reference in New Issue
Block a user