Skip to content

Commit

Permalink
commit
Browse files Browse the repository at this point in the history
  • Loading branch information
ylmbtm committed Sep 30, 2020
1 parent e041ceb commit f6f84f7
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Server/Src/LogServer/GameService.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ BOOL CGameService::Init()
return FALSE;
}

if (CommonFunc::IsAlreadyRun("LogServer" + CConfigFile::GetInstancePtr()->GetIntValue("areaid")))
if (CommonFunc::IsAlreadyRun("LogServer" + CConfigFile::GetInstancePtr()->GetStringValue("areaid")))
{
return FALSE;
}
Expand Down
5 changes: 5 additions & 0 deletions Server/Src/LoginServer/LoginMsgHandler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -309,6 +309,11 @@ BOOL CLoginMsgHandler::OnMsgLogicSvrRegReq(NetPacket* pPacket)
LogicRegToLoginAck Ack;
Ack.set_retcode(MRC_SUCCESSED);
ServiceBase::GetInstancePtr()->SendMsgProtoBuf(pPacket->m_dwConnID, MSG_LOGIC_REGTO_LOGIN_ACK, 0, 0, Ack);

CConnection* pConnection = ServiceBase::GetInstancePtr()->GetConnectionByID(pPacket->m_dwConnID);
ERROR_RETURN_TRUE(pConnection != NULL);
pConnection->SetConnectionData(1);

return TRUE;
}

Expand Down
2 changes: 0 additions & 2 deletions Server/Src/ServerEngine/ServiceBase.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -179,8 +179,6 @@ BOOL ServiceBase::Update()
m_dwLastTick = CommonFunc::GetTickCount();
}

//CConnectionMgr::GetInstancePtr()->CheckConntionAvalible();

m_QueueLock.Lock();
std::swap(m_pRecvDataQueue, m_pDispathQueue);
m_QueueLock.Unlock();
Expand Down
4 changes: 3 additions & 1 deletion Server/Src/ServerEngine/SharedMemory.h
Original file line number Diff line number Diff line change
Expand Up @@ -268,6 +268,7 @@ template <typename T> class DataWriter : public DataWriterBase
}

m_nErrorCount = 0;
UINT64 uTickStart = CommonFunc::GetTickCount();

INT32 nCreateCount = 0, nUpdateCount = 0, nDeleteCount = 0, nRealseCount = 0;
BOOL hasOprate = false;
Expand Down Expand Up @@ -391,9 +392,10 @@ template <typename T> class DataWriter : public DataWriterBase
}
}

UINT64 uTickEnd = CommonFunc::GetTickCount();
if(nCreateCount > 0 || nCreateCount > 0 || nUpdateCount > 0 || nDeleteCount > 0 || nRealseCount > 0 || m_nErrorCount > 0)
{
CLog::GetInstancePtr()->LogInfo("ModuleID:[%02d]--Create:[%d]--Update:[%d]--Delete:[%d]--Release:[%d]--Error:[%d]", m_nModuleID, nCreateCount, nUpdateCount, nDeleteCount, nRealseCount, m_nErrorCount);
CLog::GetInstancePtr()->LogInfo("ModuleID:[%02d]--Create:[%d]--Update:[%d]--Delete:[%d]--Release:[%d]--Error:[%d]--Time:[%d]", m_nModuleID, nCreateCount, nUpdateCount, nDeleteCount, nRealseCount, m_nErrorCount, uTickEnd - uTickStart);
}

return hasOprate;
Expand Down
2 changes: 1 addition & 1 deletion Server/Src/WatchServer/GameService.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ BOOL CGameService::Init()
return FALSE;
}

if (CommonFunc::IsAlreadyRun("WatchServer" + CConfigFile::GetInstancePtr()->GetIntValue("areaid")))
if (CommonFunc::IsAlreadyRun("WatchServer" + CConfigFile::GetInstancePtr()->GetStringValue("areaid")))
{
return FALSE;
}
Expand Down

0 comments on commit f6f84f7

Please sign in to comment.