Detlef Riekenberg : winspool: Load the local monitor only once.

Alexandre Julliard julliard at wine.codeweavers.com
Thu Nov 30 13:41:06 CST 2006


Module: wine
Branch: master
Commit: a7481a93c0def439ac8dd076750c03d3f0de4b5c
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=a7481a93c0def439ac8dd076750c03d3f0de4b5c

Author: Detlef Riekenberg <wine.dev at web.de>
Date:   Tue Nov 28 20:04:08 2006 +0100

winspool: Load the local monitor only once.

---

 dlls/winspool.drv/info.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/dlls/winspool.drv/info.c b/dlls/winspool.drv/info.c
index bf7015c..9234509 100644
--- a/dlls/winspool.drv/info.c
+++ b/dlls/winspool.drv/info.c
@@ -138,6 +138,7 @@ typedef struct {
 /* ############################### */
 
 static struct list monitor_handles = LIST_INIT( monitor_handles );
+static monitor_t * pm_localport;
 
 static opened_printer_t **printer_handles;
 static int nb_printer_handles;
@@ -1097,6 +1098,10 @@ static monitor_t * monitor_load(LPCWSTR
         }
     }
 cleanup:
+    if ((pm_localport ==  NULL) && (pm != NULL) && (lstrcmpW(pm->name, LocalPortW) == 0)) {
+        pm->refcount++;
+        pm_localport = pm;
+    }
     LeaveCriticalSection(&monitor_handles_cs);
     if (driver != dllname) HeapFree(GetProcessHeap(), 0, driver);
     HeapFree(GetProcessHeap(), 0, regroot);




More information about the wine-cvs mailing list