diff options
author | George Hazan <ghazan@miranda.im> | 2016-12-02 23:55:15 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2016-12-02 23:55:15 +0300 |
commit | 4882bc420186a4aef19be699e3f621dec932417d (patch) | |
tree | 4bd45d158a1a1470d590edbbb71098721d650333 /plugins/AutoShutdown/src | |
parent | 10091bbca1380a1d8e3b9d61b8c175490036af5b (diff) |
MS_SYSTEM_* services became functions
Diffstat (limited to 'plugins/AutoShutdown/src')
-rw-r--r-- | plugins/AutoShutdown/src/cpuusage.cpp | 2 | ||||
-rw-r--r-- | plugins/AutoShutdown/src/shutdownsvc.cpp | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/plugins/AutoShutdown/src/cpuusage.cpp b/plugins/AutoShutdown/src/cpuusage.cpp index 1bdd09efaa..555f1c8dbb 100644 --- a/plugins/AutoShutdown/src/cpuusage.cpp +++ b/plugins/AutoShutdown/src/cpuusage.cpp @@ -69,7 +69,7 @@ static BOOL CallBackAndWait(struct CpuUsageThreadParams *param, BYTE nCpuUsage) }
if (!param->pfnDataAvailProc(nCpuUsage, param->lParam)) return FALSE;
SleepEx(param->dwDelayMillis, TRUE);
- return !Miranda_Terminated();
+ return !Miranda_IsTerminated();
}
static void WinNT_PollThread(void *vparam)
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 */
|