summaryrefslogtreecommitdiff
path: root/protocols/IcqOscarJ/src/icq_avatar.h
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2015-03-07 19:39:33 +0000
committerGeorge Hazan <george.hazan@gmail.com>2015-03-07 19:39:33 +0000
commit8e91cc3b73d6c77c79781115fc1acbbb7fddfe32 (patch)
treed0afc2226cca8c60656eb0f89a3bf0788525d2aa /protocols/IcqOscarJ/src/icq_avatar.h
parent7ad29f87c6d2be2b8fd48c25c94a21b7a5db7b0d (diff)
- old ugly borkred mutexes removed from ICQ, cause all threads work as expected for a long time;
- even older ugly linked list of avatars replaced with LIST<>; - version bump git-svn-id: http://svn.miranda-ng.org/main/trunk@12369 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/IcqOscarJ/src/icq_avatar.h')
-rw-r--r--protocols/IcqOscarJ/src/icq_avatar.h11
1 files changed, 4 insertions, 7 deletions
diff --git a/protocols/IcqOscarJ/src/icq_avatar.h b/protocols/IcqOscarJ/src/icq_avatar.h
index 63e2658bae..240a7f076a 100644
--- a/protocols/IcqOscarJ/src/icq_avatar.h
+++ b/protocols/IcqOscarJ/src/icq_avatar.h
@@ -39,14 +39,13 @@ extern BYTE hashEmptyAvatar[9];
struct CIcqProto;
-struct avatars_server_connection : public lockable_struct
+class avatars_server_connection : public MZeroedObject
{
-protected:
CIcqProto *ppro;
HANDLE hConnection; // handle to the connection
HANDLE hPacketRecver;
WORD wLocalSequence;
- icq_critical_section *localSeqMutex;
+ mir_cs localSeqMutex, connMutex;
BOOL isLoggedIn;
BOOL isActive;
@@ -66,7 +65,7 @@ protected:
void handleAvatarFam(BYTE *pBuffer, size_t wBufferLength, snac_header *pSnacHeader);
rates *m_rates;
- icq_critical_section *m_ratesMutex;
+ mir_cs m_ratesMutex;
MCONTACT runContact[4];
DWORD runTime[4];
@@ -81,6 +80,7 @@ public:
void closeConnection();
void shutdownConnection();
+ __inline mir_cs& getLock() { return connMutex; }
__inline BOOL isPending() { return !isLoggedIn; };
__inline BOOL isReady() { return isLoggedIn && isActive && !stopThread; };
@@ -88,8 +88,6 @@ public:
DWORD sendUploadAvatarRequest(MCONTACT hContact, WORD wRef, const BYTE *data, size_t datalen);
};
-__inline static void SAFE_DELETE(avatars_server_connection **p) { SAFE_DELETE((lockable_struct**)p); };
-
struct avatars_request : public MZeroedObject
{
int type;
@@ -103,7 +101,6 @@ struct avatars_request : public MZeroedObject
size_t cbData;
WORD wRef;
DWORD timeOut;
- avatars_request *pNext;
public:
avatars_request(int type);