提交 99bc46e7 编写于 作者: M Minghao Li

sync modify timer

上级 6d6e7bdf
......@@ -210,10 +210,28 @@ static void *syncIOConsumerFunc(void *param) {
if (pRpcMsg->msgType == SYNC_PING) {
if (io->FpOnSyncPing != NULL) {
SyncPing *pSyncMsg = syncPingBuild(pRpcMsg->contLen);
syncPingFromRpcMsg(pRpcMsg, pSyncMsg);
SyncPing *pSyncMsg;
SRpcMsg tmpRpcMsg;
memcpy(&tmpRpcMsg, pRpcMsg, sizeof(SRpcMsg));
pSyncMsg = syncPingBuild(tmpRpcMsg.contLen);
// syncPingFromRpcMsg(pRpcMsg, pSyncMsg);
memcpy(pSyncMsg, tmpRpcMsg.pCont, tmpRpcMsg.contLen);
#if 0
{
cJSON *pJson = syncPing2Json(pSyncMsg);
char *serialized = cJSON_Print(pJson);
sTrace("syncIOConsumerFunc syncNodePing pMsg:%s ", serialized);
free(serialized);
cJSON_Delete(pJson);
}
#endif
io->FpOnSyncPing(io->pSyncNode, pSyncMsg);
}
} else if (pRpcMsg->msgType == SYNC_PING_REPLY) {
SyncPingReply *pSyncMsg = syncPingReplyBuild(pRpcMsg->contLen);
syncPingReplyFromRpcMsg(pRpcMsg, pSyncMsg);
......@@ -257,7 +275,8 @@ static int syncIOAuth(void *parent, char *meterId, char *spi, char *encrypt, cha
}
static void syncIOProcessRequest(void *pParent, SRpcMsg *pMsg, SEpSet *pEpSet) {
sTrace("syncIOProcessRequest: type:%d, contLen:%d, cont:%s", pMsg->msgType, pMsg->contLen, (char *)pMsg->pCont);
sTrace("<-- syncIOProcessRequest --> type:%d, contLen:%d, cont:%s", pMsg->msgType, pMsg->contLen,
(char *)pMsg->pCont);
SSyncIO *io = pParent;
SRpcMsg *pTemp;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册