diff options
Diffstat (limited to 'plugins/AutoShutdown/src/shutdownsvc.cpp')
-rw-r--r-- | plugins/AutoShutdown/src/shutdownsvc.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/plugins/AutoShutdown/src/shutdownsvc.cpp b/plugins/AutoShutdown/src/shutdownsvc.cpp index d21934975e..553ec71f87 100644 --- a/plugins/AutoShutdown/src/shutdownsvc.cpp +++ b/plugins/AutoShutdown/src/shutdownsvc.cpp @@ -134,17 +134,17 @@ static DWORD ShutdownNow(BYTE shutdownType) DWORD dwErrCode = ERROR_SUCCESS;
switch (shutdownType) {
case SDSDT_CLOSEMIRANDA:
- if (!Miranda_Terminated()) {
+ if (!Miranda_IsTerminated()) {
/* waiting for short until ready (but not too long...) */
DWORD dwLastTickCount = GetTickCount();
- while (!CallService(MS_SYSTEM_OKTOEXIT, 0, 0)) {
+ while (!Miranda_OkToExit()) {
/* infinite loop protection (max 5 sec) */
if (GetTickCount() - dwLastTickCount >= 5000) { /* wraparound works */
OutputDebugStringA("Timeout (5 sec)\n"); /* tell others, all ascii */
break;
}
SleepEx(1000, TRUE);
- if (Miranda_Terminated()) break; /* someone else did it */
+ if (Miranda_IsTerminated()) break; /* someone else did it */
OutputDebugStringA("Not ready to exit. Waiting...\n"); /* tell others, all ascii */
}
/* shutdown service must be called from main thread anyway */
|