diff options
Diffstat (limited to 'protocols/IcqOscarJ/src/icq_server.cpp')
-rw-r--r-- | protocols/IcqOscarJ/src/icq_server.cpp | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/protocols/IcqOscarJ/src/icq_server.cpp b/protocols/IcqOscarJ/src/icq_server.cpp index ebb6050c02..2a0e433761 100644 --- a/protocols/IcqOscarJ/src/icq_server.cpp +++ b/protocols/IcqOscarJ/src/icq_server.cpp @@ -210,26 +210,22 @@ void __cdecl CIcqProto::ServerThread(serverthread_start_info *infoParam) debugLogA("%s thread ended.", "Server");
}
-
-void CIcqProto::icq_serverDisconnect(BOOL bBlock)
+void CIcqProto::icq_serverDisconnect()
{
- if ( !hServerConn)
+ if (!hServerConn)
return;
debugLogA("Server shutdown requested");
Netlib_Shutdown(hServerConn);
+ debugLogA("Dropping server thread");
if (serverThreadHandle) {
- // Not called from network thread?
- if (bBlock && GetCurrentThreadId() != serverThreadId)
- while (ICQWaitForSingleObject(serverThreadHandle, INFINITE) != WAIT_OBJECT_0);
-
+ debugLogA("Closing server thread handle: %08p", serverThreadHandle);
CloseHandle(serverThreadHandle);
serverThreadHandle = NULL;
}
}
-
int CIcqProto::handleServerPackets(BYTE *buf, int len, serverthread_info *info)
{
BYTE channel;
@@ -328,7 +324,7 @@ void CIcqProto::sendServPacket(icq_packet *pPacket) DWORD dwErrorCode = GetLastError();
if (dwErrorCode != WSAESHUTDOWN)
icq_LogUsingErrorCode(LOG_ERROR, GetLastError(), LPGEN("Your connection with the ICQ server was abortively closed"));
- icq_serverDisconnect(FALSE);
+ icq_serverDisconnect();
if (m_iStatus != ID_STATUS_OFFLINE)
SetCurrentStatus(ID_STATUS_OFFLINE);
|