From 44a43b298b57921693232a47a29be6d6f2f5a05c Mon Sep 17 00:00:00 2001 From: Darryl Pogue Date: Sat, 10 Mar 2012 14:16:01 -0800 Subject: [PATCH] Try replacing CEvent with hsSemaphore. This should work because we only ever call Wait() once. It doesn't fully behave like Win32's manual reset events though, so if we had a more complex usage that depended on the event remaining signalled, we'd have a problem. --- Sources/Plasma/Apps/plClient/winmain.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Sources/Plasma/Apps/plClient/winmain.cpp b/Sources/Plasma/Apps/plClient/winmain.cpp index 94bcdd5b..ba76e22c 100644 --- a/Sources/Plasma/Apps/plClient/winmain.cpp +++ b/Sources/Plasma/Apps/plClient/winmain.cpp @@ -120,7 +120,7 @@ bool gPendingActivate = false; bool gPendingActivateFlag = false; static bool s_loginDlgRunning = false; -static CEvent s_statusEvent(kEventManualReset); +static hsSemaphore s_statusEvent(0); // Start non-signalled FILE *errFP = nil; HINSTANCE gHInst = NULL; // Instance of this app @@ -1135,7 +1135,7 @@ void StatusCallback(void *param) curl_easy_cleanup(hCurl); delete [] statusUrl; - s_statusEvent.Signal(); + s_statusEvent.Signal(); // Signal the semaphore } BOOL CALLBACK UruLoginDialogProc( HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam ) @@ -1185,7 +1185,7 @@ BOOL CALLBACK UruLoginDialogProc( HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM case WM_DESTROY: { s_loginDlgRunning = false; - s_statusEvent.Wait(kEventWaitForever); + s_statusEvent.Wait(); KillTimer(hwndDlg, AUTH_LOGIN_TIMER); return TRUE; }