summaryrefslogtreecommitdiff
path: root/protocols/IcqOscarJ/src/cookies.cpp
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/cookies.cpp
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/cookies.cpp')
-rw-r--r--protocols/IcqOscarJ/src/cookies.cpp20
1 files changed, 10 insertions, 10 deletions
diff --git a/protocols/IcqOscarJ/src/cookies.cpp b/protocols/IcqOscarJ/src/cookies.cpp
index be71d6b4ef..22bcf92a95 100644
--- a/protocols/IcqOscarJ/src/cookies.cpp
+++ b/protocols/IcqOscarJ/src/cookies.cpp
@@ -47,7 +47,7 @@ void CIcqProto::RemoveExpiredCookies()
// Generate and allocate cookie
DWORD CIcqProto::AllocateCookie(BYTE bType, WORD wIdent, MCONTACT hContact, void *pvExtra)
{
- icq_lock l(cookieMutex);
+ mir_cslock l(cookieMutex);
DWORD dwThisSeq = wCookieSeq++;
dwThisSeq &= 0x7FFF;
@@ -67,7 +67,7 @@ DWORD CIcqProto::AllocateCookie(BYTE bType, WORD wIdent, MCONTACT hContact, void
DWORD CIcqProto::GenerateCookie(WORD wIdent)
{
- icq_lock l(cookieMutex);
+ mir_cslock l(cookieMutex);
DWORD dwThisSeq = wCookieSeq++;
dwThisSeq &= 0x7FFF;
@@ -77,7 +77,7 @@ DWORD CIcqProto::GenerateCookie(WORD wIdent)
int CIcqProto::GetCookieType(DWORD dwCookie)
{
- icq_lock l(cookieMutex);
+ mir_cslock l(cookieMutex);
int i = cookies.getIndex((icq_cookie_info*)&dwCookie);
if (i != INVALID_COOKIE_INDEX)
@@ -88,7 +88,7 @@ int CIcqProto::GetCookieType(DWORD dwCookie)
int CIcqProto::FindCookie(DWORD dwCookie, MCONTACT *phContact, void **ppvExtra)
{
- icq_lock l(cookieMutex);
+ mir_cslock l(cookieMutex);
int i = cookies.getIndex((icq_cookie_info*)&dwCookie);
if (i != INVALID_COOKIE_INDEX) {
@@ -106,7 +106,7 @@ int CIcqProto::FindCookie(DWORD dwCookie, MCONTACT *phContact, void **ppvExtra)
int CIcqProto::FindCookieByData(void *pvExtra, DWORD *pdwCookie, MCONTACT *phContact)
{
- icq_lock l(cookieMutex);
+ mir_cslock l(cookieMutex);
for (int i = 0; i < cookies.getCount(); i++) {
if (pvExtra == cookies[i]->pvExtra) {
@@ -125,7 +125,7 @@ int CIcqProto::FindCookieByData(void *pvExtra, DWORD *pdwCookie, MCONTACT *phCon
int CIcqProto::FindCookieByType(BYTE bType, DWORD *pdwCookie, MCONTACT *phContact, void** ppvExtra)
{
- icq_lock l(cookieMutex);
+ mir_cslock l(cookieMutex);
for (int i = 0; i < cookies.getCount(); i++) {
if (bType == cookies[i]->bType) {
@@ -146,7 +146,7 @@ int CIcqProto::FindCookieByType(BYTE bType, DWORD *pdwCookie, MCONTACT *phContac
int CIcqProto::FindMessageCookie(DWORD dwMsgID1, DWORD dwMsgID2, DWORD *pdwCookie, MCONTACT *phContact, cookie_message_data **ppvExtra)
{
- icq_lock l(cookieMutex);
+ mir_cslock l(cookieMutex);
for (int i = 0; i < cookies.getCount(); i++) {
if (cookies[i]->bType == CKT_MESSAGE || cookies[i]->bType == CKT_FILE || cookies[i]->bType == CKT_REVERSEDIRECT) {
@@ -172,7 +172,7 @@ int CIcqProto::FindMessageCookie(DWORD dwMsgID1, DWORD dwMsgID2, DWORD *pdwCooki
void CIcqProto::FreeCookie(DWORD dwCookie)
{
- icq_lock l(cookieMutex);
+ mir_cslock l(cookieMutex);
int i = cookies.getIndex((icq_cookie_info*)&dwCookie);
if (i != INVALID_COOKIE_INDEX) {
@@ -188,7 +188,7 @@ void CIcqProto::FreeCookie(DWORD dwCookie)
void CIcqProto::FreeCookieByData(BYTE bType, void *pvExtra)
{
- icq_lock l(cookieMutex);
+ mir_cslock l(cookieMutex);
for (int i = 0; i < cookies.getCount(); i++) {
icq_cookie_info *cookie = cookies[i];
@@ -205,7 +205,7 @@ void CIcqProto::FreeCookieByData(BYTE bType, void *pvExtra)
void CIcqProto::ReleaseCookie(DWORD dwCookie)
{
- icq_lock l(cookieMutex);
+ mir_cslock l(cookieMutex);
int i = cookies.getIndex(( icq_cookie_info* )&dwCookie );
if (i != INVALID_COOKIE_INDEX) {