|
@@ -80,28 +80,28 @@ static int MakeDesc(DWORD eScreen,DeviceTypeEnum eDevicetype)
|
|
|
{
|
|
|
if (stricmp(stStaticinfo.strSite,"CMB.FLB")==0)
|
|
|
{
|
|
|
- LOG_TRACE("the type is mobile pad");
|
|
|
+ DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM)("the type is mobile pad");
|
|
|
m_eDeviceType = eMobilePadType;
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
- LOG_TRACE("the type is pad");
|
|
|
+ DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM)("the type is pad");
|
|
|
m_eDeviceType = ePadtype;
|
|
|
}
|
|
|
}
|
|
|
else if (stricmp(stStaticinfo.strMachineType,"RVC.Desk2S")==0)
|
|
|
{
|
|
|
- LOG_TRACE("the type is Desk2S");
|
|
|
+ DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM)("the type is Desk2S");
|
|
|
m_eDeviceType = eDesk2SType;
|
|
|
}
|
|
|
else if (stricmp(stStaticinfo.strMachineType,"RPM.Stand1S")==0)
|
|
|
{
|
|
|
- LOG_TRACE("the type is RPM.Stand1S");
|
|
|
+ DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM)("the type is RPM.Stand1S");
|
|
|
m_eDeviceType = eRpm1sType;
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
- LOG_TRACE("the type is standard");
|
|
|
+ DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM)("the type is standard");
|
|
|
m_eDeviceType = eStand2sType;
|
|
|
}
|
|
|
ListEntry_InitHead(&m_stateList);
|
|
@@ -122,7 +122,7 @@ static int MakeDesc(DWORD eScreen,DeviceTypeEnum eDevicetype)
|
|
|
CServerSessionBase * CBizChannelEntity::OnNewSession(const char* pszRemoteEntityName, const char * pszClass)
|
|
|
{
|
|
|
//LOG_FUNCTION();
|
|
|
- //LOG_TRACE("%s connected class = %s!", pszRemoteEntityName, pszClass);
|
|
|
+ //DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM)("%s connected class = %s!", pszRemoteEntityName, pszClass);
|
|
|
return new ChannelServiceSession(this, m_id_seq++);
|
|
|
}
|
|
|
|
|
@@ -256,7 +256,7 @@ static int MakeDesc(DWORD eScreen,DeviceTypeEnum eDevicetype)
|
|
|
ErrorCodeEnum CBizChannelEntity::Send(int type, bool compress, bool encrypt, int sub_type, int id, CBlob &data)
|
|
|
{
|
|
|
if (m_eState == eChannelState_Connected) {
|
|
|
- //LOG_TRACE("tx pkt, %d bytes, type = %d, compress = %d, encrypt = %d, sub_type = %d, id = %d, hash=%d", data.m_iLength, type, !!compress, !!encrypt, sub_type, id, hash32_buf(data.m_pData, data.m_iLength, 0));
|
|
|
+ //DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM)("tx pkt, %d bytes, type = %d, compress = %d, encrypt = %d, sub_type = %d, id = %d, hash=%d", data.m_iLength, type, !!compress, !!encrypt, sub_type, id, hash32_buf(data.m_pData, data.m_iLength, 0));
|
|
|
//Dbg("tx pkt, %d bytes, type = %d, compress = %d, encrypt = %d, sub_type = %d, id = %d, hash=%d", data.m_iLength, type, !!compress, !!encrypt, sub_type, id, hash32_buf(data.m_pData, data.m_iLength, 0));
|
|
|
int rc = bizchan_post_pkt(m_pChan, type, compress, encrypt, sub_type, id, (const char*)data.m_pData, data.m_iLength);
|
|
|
return rc == 0 ? Error_Succeed : Error_NetBroken;
|
|
@@ -270,7 +270,7 @@ static int MakeDesc(DWORD eScreen,DeviceTypeEnum eDevicetype)
|
|
|
void CBizChannelEntity::ChangeState(int new_state, const char *param)
|
|
|
{
|
|
|
if (m_eState != new_state) {
|
|
|
- LOG_TRACE("change state from %s to %s", state2str(m_eState), state2str(new_state));
|
|
|
+ DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM)("change state from %s to %s", state2str(m_eState), state2str(new_state));
|
|
|
m_eState = new_state;
|
|
|
state_entry *pos;
|
|
|
ListEntry_ForEach(pos, &m_stateList, state_entry, entry) {
|
|
@@ -288,7 +288,7 @@ static int MakeDesc(DWORD eScreen,DeviceTypeEnum eDevicetype)
|
|
|
//void on_recv_pkt(int type, int sub_type, const char *pkt, int pkt_size)
|
|
|
void CBizChannelEntity::on_recv_pkt(int type, int sub_type, int id, CBlob &data)
|
|
|
{
|
|
|
- //LOG_TRACE("rx pkt, %d bytes, type = %d, sub_type = %d, id = %d, hash = %d", data.m_iLength, type, sub_type, id, hash32_buf(data.m_pData, data.m_iLength, 0));
|
|
|
+ //DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM)("rx pkt, %d bytes, type = %d, sub_type = %d, id = %d, hash = %d", data.m_iLength, type, sub_type, id, hash32_buf(data.m_pData, data.m_iLength, 0));
|
|
|
//Dbg("rx pkt, %d bytes, type = %d, sub_type = %d, id = %d, hash = %d", data.m_iLength, type, sub_type, id, hash32_buf(data.m_pData, data.m_iLength, 0));
|
|
|
rxpkt_entry *pos;
|
|
|
ListEntry_ForEach(pos, &m_rxpktList, rxpkt_entry, entry)
|
|
@@ -389,7 +389,7 @@ static int MakeDesc(DWORD eScreen,DeviceTypeEnum eDevicetype)
|
|
|
}
|
|
|
void CBizChannelEntity::_on_recv_pkt(int type, int sub_type, int id, const char *pkt, int pkt_size)
|
|
|
{
|
|
|
- //LOG_TRACE("_on rx pkt, %d bytes, type = %d, sub_type = %d, id = %d, hash = %d", pkt_size, type, sub_type, id, hash32_buf(pkt, pkt_size, 0));
|
|
|
+ //DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM)("_on rx pkt, %d bytes, type = %d, sub_type = %d, id = %d, hash = %d", pkt_size, type, sub_type, id, hash32_buf(pkt, pkt_size, 0));
|
|
|
NotifyOnRecvPkt *task = new NotifyOnRecvPkt();
|
|
|
task->m_pEntity = this;
|
|
|
task->type = type;
|
|
@@ -427,15 +427,15 @@ static int MakeDesc(DWORD eScreen,DeviceTypeEnum eDevicetype)
|
|
|
|
|
|
void ChannelServiceSession::Handle_Connect( SpReqAnsContext<ChannelService_Connect_Req, ChannelService_Connect_Ans>::Pointer ctx )
|
|
|
{
|
|
|
- LOG_TRACE("start connect, %s:%d [%s]", (LPCSTR)ctx->Req.ip, ctx->Req.port, (LPCSTR)ctx->Req.callno);
|
|
|
+ DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM)("start connect, %s:%d [%s]", (LPCSTR)ctx->Req.ip, ctx->Req.port, (LPCSTR)ctx->Req.callno);
|
|
|
ErrorCodeEnum Error = m_pEntity->Connect(ctx->Req.ip, ctx->Req.port, ctx->Req.callno, (CallingTypeEnum)ctx->Req.etype);
|
|
|
- LOG_TRACE("connect Error = %d", Error);
|
|
|
+ DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM)("connect Error = %d", Error);
|
|
|
ctx->Answer(Error);
|
|
|
}
|
|
|
|
|
|
void ChannelServiceSession::Handle_Close( SpReqAnsContext<ChannelService_Close_Req, ChannelService_Close_Ans>::Pointer ctx )
|
|
|
{
|
|
|
- LOG_TRACE("connect close!");
|
|
|
+ DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM)("connect close!");
|
|
|
ErrorCodeEnum Error = m_pEntity->Close();
|
|
|
ctx->Answer(Error);
|
|
|
}
|