mirror of
https://github.com/reactos/reactos.git
synced 2025-02-22 16:36:33 +00:00
Fix a race condition between umpnpmgr service and CMP_WaitNoPendingInstallEvents API.
svn path=/trunk/; revision=37894
This commit is contained in:
parent
1a716522d1
commit
2a8bf4162a
1 changed files with 11 additions and 5 deletions
|
@ -2221,11 +2221,6 @@ ServiceMain(DWORD argc, LPTSTR *argv)
|
|||
|
||||
DPRINT("ServiceMain() called\n");
|
||||
|
||||
hNoPendingInstalls = CreateEventW(NULL,
|
||||
TRUE,
|
||||
FALSE,
|
||||
L"Global\\PnP_No_Pending_Install_Events");
|
||||
|
||||
hThread = CreateThread(NULL,
|
||||
0,
|
||||
PnpEventThread,
|
||||
|
@ -2283,6 +2278,17 @@ wmain(int argc, WCHAR *argv[])
|
|||
return dwError;
|
||||
}
|
||||
|
||||
hNoPendingInstalls = CreateEventW(NULL,
|
||||
TRUE,
|
||||
FALSE,
|
||||
L"Global\\PnP_No_Pending_Install_Events");
|
||||
if (hNoPendingInstalls == NULL)
|
||||
{
|
||||
dwError = GetLastError();
|
||||
DPRINT1("Could not create the Event! (Error %lu)\n", dwError);
|
||||
return dwError;
|
||||
}
|
||||
|
||||
#ifdef HAVE_SLIST_ENTRY_IMPLEMENTED
|
||||
InitializeSListHead(&DeviceInstallListHead);
|
||||
#else
|
||||
|
|
Loading…
Reference in a new issue