From 3ad2582c4a4a6378f294f9256ecbcbdf0ae88e3a Mon Sep 17 00:00:00 2001 From: George Hazan Date: Thu, 3 May 2018 16:02:14 +0200 Subject: mir_forkThread - stronger typizatioin for thread function parameter --- protocols/EmLanProto/src/lan.cpp | 9 ++++----- protocols/EmLanProto/src/mlan.cpp | 2 +- 2 files changed, 5 insertions(+), 6 deletions(-) (limited to 'protocols/EmLanProto/src') diff --git a/protocols/EmLanProto/src/lan.cpp b/protocols/EmLanProto/src/lan.cpp index 301e2a8284..d7737b2479 100644 --- a/protocols/EmLanProto/src/lan.cpp +++ b/protocols/EmLanProto/src/lan.cpp @@ -131,8 +131,8 @@ void CLan::StartListen() return; } - m_hListenThread = mir_forkthread(ListenProc, (void*)this); - m_hAcceptTCPThread = mir_forkthread(AcceptTCPProc, (void*)this); + m_hListenThread = mir_forkthread(ListenProc, this); + m_hAcceptTCPThread = mir_forkthread(AcceptTCPProc, this); if (m_hListenThread == nullptr || m_hAcceptTCPThread == nullptr) { m_mode = LM_ON; m_status = LS_CANT_CREATE_THREADS; @@ -216,7 +216,7 @@ void CLan::AcceptTCP() tcp_conn->m_addr = addrFrom.sin_addr.S_un.S_addr; tcp_conn->m_lan = this; tcp_conn->m_socket = in_socket; - mir_forkthread(OnInTCPConnectionProc, (void*)tcp_conn); + mir_forkthread(OnInTCPConnectionProc, tcp_conn); Sleep(100); } m_hAcceptTCPThread = nullptr; @@ -252,8 +252,7 @@ SOCKET CLan::CreateTCPConnection(u_long addr, LPVOID lpParameter) tcp_conn->m_lan = this; tcp_conn->m_addr = addr; tcp_conn->m_lpParameter = lpParameter; - - mir_forkthread(OnOutTCPConnectionProc, (void*)tcp_conn); + mir_forkthread(OnOutTCPConnectionProc, tcp_conn); return out_socket; } diff --git a/protocols/EmLanProto/src/mlan.cpp b/protocols/EmLanProto/src/mlan.cpp index e7e6b8963d..948f011e52 100644 --- a/protocols/EmLanProto/src/mlan.cpp +++ b/protocols/EmLanProto/src/mlan.cpp @@ -126,7 +126,7 @@ void CMLan::StartChecking() for (TContact *cont = m_pRootContact; cont; cont = cont->m_prev) cont->m_time = MLAN_CHECK + MLAN_TIMEOUT; - m_hCheckThread = mir_forkthread(CheckProc, (void*)this); + m_hCheckThread = mir_forkthread(CheckProc, this); StartListen(); RequestStatus(true); } -- cgit v1.2.3