summaryrefslogtreecommitdiff
path: root/plugins/YAMN/src/services.cpp
diff options
context:
space:
mode:
authorTobias Weimer <wishmaster51@googlemail.com>2015-09-02 21:04:37 +0000
committerTobias Weimer <wishmaster51@googlemail.com>2015-09-02 21:04:37 +0000
commita9fc674b3971ec9f20c719f5e8c6b3dfed8c4961 (patch)
tree5f7f14fff3b488e1367ec836d4b5878ee155ffda /plugins/YAMN/src/services.cpp
parent3e16157bf6d179040f07a89dac60f2a4a4c1c525 (diff)
YAMN:
- many small fixes git-svn-id: http://svn.miranda-ng.org/main/trunk@15160 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/YAMN/src/services.cpp')
-rw-r--r--plugins/YAMN/src/services.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/plugins/YAMN/src/services.cpp b/plugins/YAMN/src/services.cpp
index d03a8e2c6c..7dc812ba0c 100644
--- a/plugins/YAMN/src/services.cpp
+++ b/plugins/YAMN/src/services.cpp
@@ -124,12 +124,11 @@ static INT_PTR AccountMailCheck(WPARAM wParam, LPARAM lParam)
{
//This service will check/sincronize the account pointed by wParam
HACCOUNT ActualAccount = (HACCOUNT)wParam;
- HANDLE ThreadRunningEV;
- DWORD tid;
// copy/paste make mistakes
if (ActualAccount != NULL) {
//we use event to signal, that running thread has all needed stack parameters copied
- if (NULL == (ThreadRunningEV = CreateEvent(NULL, FALSE, FALSE, NULL)))
+ HANDLE ThreadRunningEV = CreateEvent(NULL, FALSE, FALSE, NULL);
+ if (ThreadRunningEV == NULL)
return 0;
//if we want to close miranda, we get event and do not run pop3 checking anymore
if (WAIT_OBJECT_0 == WaitForSingleObject(ExitEV, 0))
@@ -149,11 +148,12 @@ static INT_PTR AccountMailCheck(WPARAM wParam, LPARAM lParam)
DebugLog(SynchroFile, "ForceCheck:ActualAccountSO-read enter\n");
#endif
if ((ActualAccount->Flags & YAMN_ACC_ENA) && ActualAccount->Plugin->Fcn->SynchroFcnPtr) {
- struct CheckParam ParamToPlugin = {YAMN_CHECKVERSION, ThreadRunningEV, ActualAccount, lParam?YAMN_FORCECHECK:YAMN_NORMALCHECK, (void *)0, NULL};
- HANDLE NewThread;
+ struct CheckParam ParamToPlugin = {YAMN_CHECKVERSION, ThreadRunningEV, ActualAccount, lParam?YAMN_FORCECHECK:YAMN_NORMALCHECK, 0, NULL};
ActualAccount->TimeLeft = ActualAccount->Interval;
- if (NewThread = CreateThread(NULL, 0, (YAMN_STANDARDFCN)ActualAccount->Plugin->Fcn->SynchroFcnPtr, &ParamToPlugin, 0, &tid)) {
+ DWORD tid;
+ HANDLE NewThread = CreateThread(NULL, 0, (YAMN_STANDARDFCN)ActualAccount->Plugin->Fcn->SynchroFcnPtr, &ParamToPlugin, 0, &tid);
+ if (NewThread) {
WaitForSingleObject(ThreadRunningEV, INFINITE);
CloseHandle(NewThread);
}