Skip to content

Commit a86dcc9

Browse files
committed
增加一处调试信息。
1 parent 2066f2d commit a86dcc9

2 files changed

Lines changed: 16 additions & 2 deletions

File tree

‎kbe/src/server/baseapp/baseapp.cpp‎

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1898,9 +1898,19 @@ void Baseapp::forwardMessageToClientFromCellapp(Mercury::Channel* pChannel,
18981898

18991899
Mercury::Bundle* pBundle = Mercury::Bundle::ObjPool().createObject();
19001900
(*pBundle).append(s);
1901-
s.read_skip(s.opsize());
19021901
mailbox->postMail((*pBundle));
19031902
Mercury::Bundle::ObjPool().reclaimObject(pBundle);
1903+
1904+
if(Mercury::g_trace_packet > 0 && s.opsize() >= sizeof(Mercury::MessageID))
1905+
{
1906+
Mercury::MessageID fmsgid = 0;
1907+
s >> fmsgid;
1908+
Mercury::MessageHandler* pMessageHandler = ClientInterface::messageHandlers.find(fmsgid);
1909+
DEBUG_MSG(boost::format("Baseapp::forwardMessageToClientFromCellapp: %1%(msgid=%2%).\n") %
1910+
(pMessageHandler == NULL ? "unknown" : pMessageHandler->name) % fmsgid);
1911+
}
1912+
1913+
s.read_skip(s.opsize());
19041914
}
19051915

19061916
//-------------------------------------------------------------------------------------
@@ -1969,7 +1979,7 @@ void Baseapp::onEntityMail(Mercury::Channel* pChannel, KBEngine::MemoryStream& s
19691979
mailbox->newMail(bundle);
19701980
bundle.append(s);
19711981

1972-
if(Mercury::g_trace_packet > 0)
1982+
if(Mercury::g_trace_packet > 0 && s.opsize() >= sizeof(ENTITY_METHOD_UID))
19731983
{
19741984
ENTITY_METHOD_UID utype = 0;
19751985
s >> utype;

‎kbe/src/server/dbmgr/dbtasks.cpp‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -634,7 +634,11 @@ bool DBTaskAccountLogin::db_thread_process()
634634
ACCOUNT_INFOS info;
635635
info.dbid = 0;
636636
if(!pTable->queryAccount(pdbi_, accountName_, info))
637+
{
638+
WARNING_MSG(boost::format("DBTaskAccountLogin::db_thread_process(): not found account[%1%], login is failed!\n") %
639+
accountName_);
637640
return false;
641+
}
638642

639643
if(info.dbid == 0)
640644
return false;

0 commit comments

Comments
 (0)