[PATCH] Revert "winspool.drv: Make sure the printer driver registry entry exists."

Detlef Riekenberg wine.dev at web.de
Tue Jun 24 16:42:06 CDT 2008


This reverts commit 4f6f415aaa2dbc4a00b2b1b7dfe0ec5c5ed9a253.

The patch added a circular dependance, resulting in a crash.
( http://www.winehq.org/pipermail/wine-devel/2008-June/066625.html )

sequence:
1. during winspool.dev/process-attach, installed printers should be
   enumerated and added to Wine
2. With the Patch, the driver should be added again for an existing printer
3. winspool.drv/AddPrinterDriverExW need to load the backend (localspl.dll)
4. localspl.dll has a reference to spoolss.dll (correct)
5. spoolss.dll has a reference to winspool.drv.
   This is wrong and must go away (spoolss.dll must dynamic load all
   print providor during start), but this is only possible, when the
   relevant code is implemented in localspl.dll
   (can be moved from from winspool.drv to localspl.dll)
6. crash, since we try to load winspool.drv again

Extra Info for sequence 2:
For an very old wine tree (created before 4Q 2005), no seperate driver
was added for every Printer
---
 dlls/winspool.drv/info.c |    2 --
 1 files changed, 0 insertions(+), 2 deletions(-)

diff --git a/dlls/winspool.drv/info.c b/dlls/winspool.drv/info.c
index b49dd53..abc3397 100644
--- a/dlls/winspool.drv/info.c
+++ b/dlls/winspool.drv/info.c
@@ -524,7 +524,6 @@ static BOOL CUPS_LoadPrinters(void)
             TRACE("Printer already exists\n");
             RegDeleteValueW(hkeyPrinter, May_Delete_Value);
             RegCloseKey(hkeyPrinter);
-            add_printer_driver(dests[i].name);
         } else {
             static CHAR data_type[] = "RAW",
                     print_proc[]    = "WinPrint",
@@ -662,7 +661,6 @@ PRINTCAP_ParseEntry(const char *pent, BOOL isfirst) {
         TRACE("Printer already exists\n");
         RegDeleteValueW(hkeyPrinter, May_Delete_Value);
         RegCloseKey(hkeyPrinter);
-        add_printer_driver(devname);
     } else {
         static CHAR data_type[]   = "RAW",
                     print_proc[]  = "WinPrint",
-- 
1.5.4.3


--=-iAQr6a7x4Ih+pKKpp0oC--




More information about the wine-devel mailing list