From 88a83af3018764cb3de1e37ed2bc247830ca1e52 Mon Sep 17 00:00:00 2001 From: Colin Finck Date: Sat, 18 Apr 2009 14:24:02 +0000 Subject: [PATCH] Only trigger the installer thread after we got the user token. Fixes a race condition mostly occuring under real hardware. See issue #4390 for more details. svn path=/trunk/; revision=40576 --- reactos/base/services/umpnpmgr/umpnpmgr.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/reactos/base/services/umpnpmgr/umpnpmgr.c b/reactos/base/services/umpnpmgr/umpnpmgr.c index af5f98ff480..6b4b4b72fd0 100644 --- a/reactos/base/services/umpnpmgr/umpnpmgr.c +++ b/reactos/base/services/umpnpmgr/umpnpmgr.c @@ -234,9 +234,6 @@ DWORD PNP_ReportLogOn( DPRINT("PNP_ReportLogOn(%u, %u) called\n", Admin, ProcessId); - if (hInstallEvent != NULL) - SetEvent(hInstallEvent); - /* Get the users token */ hProcess = OpenProcess(PROCESS_ALL_ACCESS, TRUE, ProcessId); @@ -259,8 +256,8 @@ DWORD PNP_ReportLogOn( } /* Trigger the installer thread */ - /*if (hInstallEvent != NULL) - SetEvent(hInstallEvent);*/ + if (hInstallEvent) + SetEvent(hInstallEvent); ReturnValue = CR_SUCCESS;