From a7481a93c0def439ac8dd076750c03d3f0de4b5c Mon Sep 17 00:00:00 2001 From: Detlef Riekenberg Date: Tue, 28 Nov 2006 20:04:08 +0100 Subject: [PATCH] winspool: Load the local monitor only once. --- dlls/winspool.drv/info.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/dlls/winspool.drv/info.c b/dlls/winspool.drv/info.c index bf7015c5bbf..9234509b3b8 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 name, LPWSTR dllname) } } 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);