MCPcopy Create free account
hub / github.com/cppla/ServerStatus / OnDelClient

Method OnDelClient

server/src/main.cpp:287–302  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

285}
286
287void CMain::OnDelClient(int ClientNetID)
288{
289 int ClientID = ClientNetToClient(ClientNetID);
290 dbg_msg("main", "OnDelClient(ncid=%d, cid=%d)", ClientNetID, ClientID);
291 if(ClientID >= 0 && ClientID < NET_MAX_CLIENTS)
292 {
293 Client(ClientID)->m_Connected = false;
294 Client(ClientID)->m_ClientNetID = -1;
295 Client(ClientID)->m_ClientNetType = NETTYPE_INVALID;
296 mem_zero(&Client(ClientID)->m_Stats, sizeof(CClient::CStats));
297 }
298 m_OfflineAlarmThreadData.pClients = m_aClients;
299 m_OfflineAlarmThreadData.pWatchDogs = m_aCWatchDogs;
300 m_OfflineAlarmThreadData.m_ReloadRequired = ClientID;
301 thread_create(offlineAlarmThread, &m_OfflineAlarmThreadData);
302}
303
304int CMain::HandleMessage(int ClientNetID, char *pMessage)
305{

Callers 1

DelClientCallbackMethod · 0.80

Calls 3

dbg_msgFunction · 0.85
mem_zeroFunction · 0.85
thread_createFunction · 0.85

Tested by

no test coverage detected