提交 08df4b42 编写于 作者: M Minghao Li

sync modify timer

上级 99bc46e7
......@@ -30,8 +30,8 @@ extern "C" {
// encode as uint64
typedef enum ESyncMessageType {
SYNC_PING = 100,
SYNC_PING_REPLY,
SYNC_PING = 101,
SYNC_PING_REPLY = 103,
SYNC_CLIENT_REQUEST,
SYNC_CLIENT_REQUEST_REPLY,
SYNC_REQUEST_VOTE,
......
......@@ -216,19 +216,10 @@ static void *syncIOConsumerFunc(void *param) {
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
syncPingFromRpcMsg(pRpcMsg, pSyncMsg);
// memcpy(pSyncMsg, tmpRpcMsg.pCont, tmpRpcMsg.contLen);
io->FpOnSyncPing(io->pSyncNode, pSyncMsg);
}
......
......@@ -230,7 +230,16 @@ static int32_t syncNodeSendMsgByInfo(const SNodeInfo* nodeInfo, SSyncNode* pSync
static int32_t syncNodeOnPingCb(SSyncNode* ths, SyncPing* pMsg) {
int32_t ret = 0;
sTrace("syncNodeOnPingCb ---- =========");
sTrace("<-- syncNodeOnPingCb -->");
{
cJSON* pJson = syncPing2Json(pMsg);
char* serialized = cJSON_Print(pJson);
sTrace("syncNodeOnPingCb syncNodePing pMsg:%s ", serialized);
free(serialized);
cJSON_Delete(pJson);
}
return ret;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册