summaryrefslogtreecommitdiff
path: root/src/core
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2015-01-04 20:19:29 +0000
committerGeorge Hazan <george.hazan@gmail.com>2015-01-04 20:19:29 +0000
commit82376c5c1f25318bd67fdfbe92219658252f7e0a (patch)
treeaea1f367dd1fdfab54ad920c5481848204da98ff /src/core
parent0b53ac8d4073db3a8325e5b59fa26e036ef2366f (diff)
minus critical section
git-svn-id: http://svn.miranda-ng.org/main/trunk@11772 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'src/core')
-rw-r--r--src/core/stdmsg/src/cmdlist.cpp11
-rw-r--r--src/core/stdmsg/src/cmdlist.h1
-rw-r--r--src/core/stdmsg/src/msgs.cpp1
3 files changed, 2 insertions, 11 deletions
diff --git a/src/core/stdmsg/src/cmdlist.cpp b/src/core/stdmsg/src/cmdlist.cpp
index 25ddfce52c..e95b2b2051 100644
--- a/src/core/stdmsg/src/cmdlist.cpp
+++ b/src/core/stdmsg/src/cmdlist.cpp
@@ -22,7 +22,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include "commonheaders.h"
static LIST<TMsgQueue> msgQueue(5, NumericKeySortT);
-static CRITICAL_SECTION csMsgQueue;
+static mir_cs csMsgQueue;
static UINT_PTR timerId;
void MessageFailureProcess(TMsgQueue *item, const char* err);
@@ -45,7 +45,7 @@ static VOID CALLBACK MsgTimer(HWND hwnd, UINT uMsg, UINT_PTR idEvent, DWORD dwTi
MessageFailureProcess(arTimedOut[i], LPGEN("The message send timed out."));
}
-void msgQueue_add(MCONTACT hContact, int id, const TCHAR* szMsg, HANDLE hDbEvent)
+void msgQueue_add(MCONTACT hContact, int id, const TCHAR *szMsg, HANDLE hDbEvent)
{
TMsgQueue *item = (TMsgQueue*)mir_alloc(sizeof(TMsgQueue));
item->hContact = hContact;
@@ -86,11 +86,6 @@ void msgQueue_processack(MCONTACT hContact, int id, BOOL success, const char* sz
}
}
-void msgQueue_init(void)
-{
- InitializeCriticalSection(&csMsgQueue);
-}
-
void msgQueue_destroy(void)
{
for (int i = 0; i < msgQueue.getCount(); i++) {
@@ -99,6 +94,4 @@ void msgQueue_destroy(void)
mir_free(item);
}
msgQueue.destroy();
-
- DeleteCriticalSection(&csMsgQueue);
}
diff --git a/src/core/stdmsg/src/cmdlist.h b/src/core/stdmsg/src/cmdlist.h
index e2076e25d5..caeac3cfd9 100644
--- a/src/core/stdmsg/src/cmdlist.h
+++ b/src/core/stdmsg/src/cmdlist.h
@@ -33,7 +33,6 @@ struct TMsgQueue
void msgQueue_add(MCONTACT hContact, int id, const TCHAR* szMsg, HANDLE hDbEvent);
void msgQueue_processack(MCONTACT hContact, int id, BOOL success, const char* szErr);
-void msgQueue_init(void);
void msgQueue_destroy(void);
#endif
diff --git a/src/core/stdmsg/src/msgs.cpp b/src/core/stdmsg/src/msgs.cpp
index 4077bc38b1..2a846769ec 100644
--- a/src/core/stdmsg/src/msgs.cpp
+++ b/src/core/stdmsg/src/msgs.cpp
@@ -391,7 +391,6 @@ int LoadSendRecvMessageModule(void)
InitGlobals();
RichUtil_Load();
InitOptions();
- msgQueue_init();
HookEvent(ME_DB_EVENT_ADDED, MessageEventAdded);
HookEvent(ME_DB_CONTACT_SETTINGCHANGED, MessageSettingChanged);