From a5751e2d5bb140a640ecf1810f45cf7c70028ac3 Mon Sep 17 00:00:00 2001 From: simon Date: Sun, 11 Aug 2002 12:17:25 +0000 Subject: [PATCH] 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. git-svn-id: svn://svn.tartarus.org/sgt/putty@1829 cda61777-01e9-0310-a592-d414129be87e --- printing.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/printing.c b/printing.c index d40e2ac0..964f4b52 100644 --- a/printing.c +++ b/printing.c @@ -65,14 +65,8 @@ printer_enum *printer_start_enum(int *nprinters_ptr) *nprinters_ptr = 0; /* default return value */ buffer = smalloc(512); - retval = printer_add_enum(PRINTER_ENUM_LOCAL, buffer, 0, nprinters_ptr); - if (!retval) - goto error; - else - buffer = retval; - retval = printer_add_enum(PRINTER_ENUM_CONNECTIONS, buffer, - sizeof(ENUM_TYPE) * *nprinters_ptr, - nprinters_ptr); + retval = printer_add_enum(PRINTER_ENUM_LOCAL | PRINTER_ENUM_CONNECTIONS, + buffer, 0, nprinters_ptr); if (!retval) goto error; else -- 2.11.0