sync modify timer
This commit is contained in:
parent
99bc46e7de
commit
08df4b42de
|
@ -30,8 +30,8 @@ extern "C" {
|
||||||
|
|
||||||
// encode as uint64
|
// encode as uint64
|
||||||
typedef enum ESyncMessageType {
|
typedef enum ESyncMessageType {
|
||||||
SYNC_PING = 100,
|
SYNC_PING = 101,
|
||||||
SYNC_PING_REPLY,
|
SYNC_PING_REPLY = 103,
|
||||||
SYNC_CLIENT_REQUEST,
|
SYNC_CLIENT_REQUEST,
|
||||||
SYNC_CLIENT_REQUEST_REPLY,
|
SYNC_CLIENT_REQUEST_REPLY,
|
||||||
SYNC_REQUEST_VOTE,
|
SYNC_REQUEST_VOTE,
|
||||||
|
|
|
@ -216,19 +216,10 @@ static void *syncIOConsumerFunc(void *param) {
|
||||||
memcpy(&tmpRpcMsg, pRpcMsg, sizeof(SRpcMsg));
|
memcpy(&tmpRpcMsg, pRpcMsg, sizeof(SRpcMsg));
|
||||||
pSyncMsg = syncPingBuild(tmpRpcMsg.contLen);
|
pSyncMsg = syncPingBuild(tmpRpcMsg.contLen);
|
||||||
|
|
||||||
// syncPingFromRpcMsg(pRpcMsg, pSyncMsg);
|
syncPingFromRpcMsg(pRpcMsg, pSyncMsg);
|
||||||
|
|
||||||
memcpy(pSyncMsg, tmpRpcMsg.pCont, tmpRpcMsg.contLen);
|
// 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);
|
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) {
|
static int32_t syncNodeOnPingCb(SSyncNode* ths, SyncPing* pMsg) {
|
||||||
int32_t ret = 0;
|
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;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue