Commit a7481a93 authored by Detlef Riekenberg's avatar Detlef Riekenberg Committed by Alexandre Julliard

winspool: Load the local monitor only once.

parent 47a2e96a
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment