summaryrefslogtreecommitdiff
path: root/protocols/EmLanProto/src/mlan.h
diff options
context:
space:
mode:
authorKirill Volinsky <mataes2007@gmail.com>2015-05-11 10:54:59 +0000
committerKirill Volinsky <mataes2007@gmail.com>2015-05-11 10:54:59 +0000
commit5af12c9cae8b3622e5237d2c968344c9733b2056 (patch)
tree42d60d8680b61115b1b252a8fe803dba91b0f294 /protocols/EmLanProto/src/mlan.h
parentee90813b6bdc012083c62ac113d94067bca87611 (diff)
minus critical section
git-svn-id: http://svn.miranda-ng.org/main/trunk@13521 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/EmLanProto/src/mlan.h')
-rw-r--r--protocols/EmLanProto/src/mlan.h15
1 files changed, 7 insertions, 8 deletions
diff --git a/protocols/EmLanProto/src/mlan.h b/protocols/EmLanProto/src/mlan.h
index d3f518b04d..ce65192ad9 100644
--- a/protocols/EmLanProto/src/mlan.h
+++ b/protocols/EmLanProto/src/mlan.h
@@ -96,9 +96,9 @@ private:
char m_name[MAX_HOSTNAME_LEN];
int m_nameLen;
- CRITICAL_SECTION m_csAccessClass;
- CRITICAL_SECTION m_csReceiveThreadLock;
- CRITICAL_SECTION m_csAccessAwayMes;
+ mir_cs m_csAccessClass;
+ mir_cs m_csReceiveThreadLock;
+ mir_cs m_csAccessAwayMes;
void RequestStatus(bool answer=false, u_long m_addr=INADDR_BROADCAST);
MCONTACT FindContact(in_addr addr, const char* nick, bool add_to_list, bool make_permanent, bool make_visible, u_int status = ID_STATUS_ONLINE);
@@ -162,9 +162,8 @@ private:
TFileConnection();
~TFileConnection();
- void Lock() { EnterCriticalSection(&m_csAccess); }
- void Unlock() { LeaveCriticalSection(&m_csAccess); }
- void Terminate() { Lock(); m_state = FCS_TERMINATE; Unlock(); }
+ void Lock() { mir_cslock lck(m_csAccess); }
+ void Terminate() { Lock(); m_state = FCS_TERMINATE; }
int Recv(bool halt=true);
int Send(u_char* buf, int size);
int SendRaw(u_char* buf, int size);
@@ -186,12 +185,12 @@ private:
u_char* m_buf;
int m_recSize;
- CRITICAL_SECTION m_csAccess;
+ mir_cs m_csAccess;
};
void FileAddToList(TFileConnection* conn);
void FileRemoveFromList(TFileConnection* conn);
- CRITICAL_SECTION m_csFileConnectionList;
+ mir_cs m_csFileConnectionList;
TFileConnection* m_pFileConnectionList;
};