summaryrefslogtreecommitdiff
path: root/protocols/IcqOscarJ/src/oscar_filetransfer.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/oscar_filetransfer.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/oscar_filetransfer.cpp')
-rw-r--r--protocols/IcqOscarJ/src/oscar_filetransfer.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/protocols/IcqOscarJ/src/oscar_filetransfer.cpp b/protocols/IcqOscarJ/src/oscar_filetransfer.cpp
index 727c279d2c..464b9fc916 100644
--- a/protocols/IcqOscarJ/src/oscar_filetransfer.cpp
+++ b/protocols/IcqOscarJ/src/oscar_filetransfer.cpp
@@ -85,7 +85,7 @@ oscar_filetransfer* CIcqProto::CreateOscarTransfer()
// Init members
ft->fileId = -1;
- icq_lock l(oftMutex);
+ mir_cslock l(oftMutex);
fileTransferList = (basic_filetransfer**)SAFE_REALLOC(fileTransferList, sizeof(basic_filetransfer*)*(fileTransferCount + 1));
fileTransferList[fileTransferCount++] = ft;
@@ -101,7 +101,7 @@ filetransfer *CIcqProto::CreateIcqFileTransfer()
ft->ft_magic = FT_MAGIC_ICQ;
- icq_lock l(oftMutex);
+ mir_cslock l(oftMutex);
fileTransferList = (basic_filetransfer**)SAFE_REALLOC(fileTransferList, sizeof(basic_filetransfer*)*(fileTransferCount + 1));
fileTransferList[fileTransferCount++] = (basic_filetransfer*)ft;
@@ -132,19 +132,19 @@ void CIcqProto::ReleaseFileTransfer(void *ft)
int CIcqProto::IsValidFileTransfer(void *ft)
{
- icq_lock l(oftMutex);
+ mir_cslock l(oftMutex);
return getFileTransferIndex(ft) != -1;
}
int CIcqProto::IsValidOscarTransfer(void *ft)
{
- icq_lock l(oftMutex);
+ mir_cslock l(oftMutex);
return getFileTransferIndex(ft) != -1 && ((basic_filetransfer*)ft)->ft_magic == FT_MAGIC_OSCAR;
}
oscar_filetransfer* CIcqProto::FindOscarTransfer(MCONTACT hContact, DWORD dwID1, DWORD dwID2)
{
- icq_lock l(oftMutex);
+ mir_cslock l(oftMutex);
for (int i = 0; i < fileTransferCount; i++) {
if (fileTransferList[i]->ft_magic == FT_MAGIC_OSCAR) {
@@ -162,7 +162,7 @@ void CIcqProto::SafeReleaseFileTransfer(void **ft)
{
basic_filetransfer **bft = (basic_filetransfer**)ft;
- icq_lock l(oftMutex);
+ mir_cslock l(oftMutex);
// Check for filetransfer validity
if (getFileTransferIndex(*ft) == -1)
@@ -1051,7 +1051,7 @@ static void oft_buildProtoFileTransferStatus(oscar_filetransfer* ft, PROTOFILETR
void CIcqProto::CloseOscarConnection(oscar_connection *oc)
{
- icq_lock l(oftMutex);
+ mir_cslock l(oftMutex);
if (oc) {
oc->type = OCT_CLOSING;
@@ -1343,7 +1343,7 @@ void __cdecl CIcqProto::oft_connectionThread(oscarthreadstartinfo *otsi)
// Clean up
{
- icq_lock l(oftMutex);
+ mir_cslock l(oftMutex);
if (getFileTransferIndex(oc.ft) != -1)
oc.ft->connection = NULL; // release link
@@ -2010,7 +2010,7 @@ void CIcqProto::oft_sendFileData(oscar_connection *oc)
void CIcqProto::oft_sendPeerInit(oscar_connection *oc)
{
- icq_lock l(oftMutex);
+ mir_cslock l(oftMutex);
// prepare init frame
oscar_filetransfer *ft = oc->ft;