mirror of
https://foundry.openuru.org/gitblit/r/CWE-ou-minkata.git
synced 2025-07-14 02:27:40 -04:00
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.
This commit is contained in:
@ -120,7 +120,7 @@ bool gPendingActivate = false;
|
|||||||
bool gPendingActivateFlag = false;
|
bool gPendingActivateFlag = false;
|
||||||
|
|
||||||
static bool s_loginDlgRunning = false;
|
static bool s_loginDlgRunning = false;
|
||||||
static CEvent s_statusEvent(kEventManualReset);
|
static hsSemaphore s_statusEvent(0); // Start non-signalled
|
||||||
|
|
||||||
FILE *errFP = nil;
|
FILE *errFP = nil;
|
||||||
HINSTANCE gHInst = NULL; // Instance of this app
|
HINSTANCE gHInst = NULL; // Instance of this app
|
||||||
@ -1135,7 +1135,7 @@ void StatusCallback(void *param)
|
|||||||
curl_easy_cleanup(hCurl);
|
curl_easy_cleanup(hCurl);
|
||||||
delete [] statusUrl;
|
delete [] statusUrl;
|
||||||
|
|
||||||
s_statusEvent.Signal();
|
s_statusEvent.Signal(); // Signal the semaphore
|
||||||
}
|
}
|
||||||
|
|
||||||
BOOL CALLBACK UruLoginDialogProc( HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam )
|
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:
|
case WM_DESTROY:
|
||||||
{
|
{
|
||||||
s_loginDlgRunning = false;
|
s_loginDlgRunning = false;
|
||||||
s_statusEvent.Wait(kEventWaitForever);
|
s_statusEvent.Wait();
|
||||||
KillTimer(hwndDlg, AUTH_LOGIN_TIMER);
|
KillTimer(hwndDlg, AUTH_LOGIN_TIMER);
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user