From 1ebb0bf00fd764cdf9541e5e3af115e394e09132 Mon Sep 17 00:00:00 2001 From: Mounir IDRASSI Date: Sat, 8 Jul 2017 23:59:22 +0200 Subject: Windows: correctly initialize global critical sections in case if system favorites service. --- src/Mount/Mount.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/Mount/Mount.c') diff --git a/src/Mount/Mount.c b/src/Mount/Mount.c index d3886726..1d046249 100644 --- a/src/Mount/Mount.c +++ b/src/Mount/Mount.c @@ -9144,6 +9144,8 @@ static VOID WINAPI SystemFavoritesServiceMain (DWORD argc, LPTSTR *argv) if (!SystemFavoritesServiceStatusHandle) return; + InitGlobalLocks (); + SystemFavoritesServiceSetStatus (SERVICE_START_PENDING, 120000); SystemFavoritesServiceLogInfo (wstring (L"Initializing list of host devices")); @@ -9167,6 +9169,8 @@ static VOID WINAPI SystemFavoritesServiceMain (DWORD argc, LPTSTR *argv) SystemFavoritesServiceLogError (wstring (L"System Favorites mounting process failed.")); } + FinalizeGlobalLocks (); + SystemFavoritesServiceSetStatus (SERVICE_RUNNING); SystemFavoritesServiceSetStatus (SERVICE_STOPPED); } -- cgit v1.2.3