summaryrefslogtreecommitdiff
path: root/protocols/AimOscar/src/utility.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'protocols/AimOscar/src/utility.cpp')
-rw-r--r--protocols/AimOscar/src/utility.cpp13
1 files changed, 6 insertions, 7 deletions
diff --git a/protocols/AimOscar/src/utility.cpp b/protocols/AimOscar/src/utility.cpp
index 00af4417d4..28678182a4 100644
--- a/protocols/AimOscar/src/utility.cpp
+++ b/protocols/AimOscar/src/utility.cpp
@@ -135,15 +135,14 @@ bool CAimProto::wait_conn(HANDLE& hConn, HANDLE& hEvent, unsigned short service)
{
if (m_iStatus == ID_STATUS_OFFLINE)
return false;
-
- EnterCriticalSection(&connMutex);
- if (hConn == NULL && hServerConn)
{
- debugLogA("Starting Connection.");
- hConn = (HANDLE)1; //set so no additional service request attempts are made while aim is still processing the request
- aim_new_service_request(hServerConn, seqno, service) ;//general service connection!
+ mir_cslock lck(connMutex);
+ if (hConn == NULL && hServerConn) {
+ debugLogA("Starting Connection.");
+ hConn = (HANDLE)1; //set so no additional service request attempts are made while aim is still processing the request
+ aim_new_service_request(hServerConn, seqno, service);//general service connection!
+ }
}
- LeaveCriticalSection(&connMutex);
if (WaitForSingleObjectEx(hEvent, 10000, TRUE) != WAIT_OBJECT_0)
return false;