sync modify timer
This commit is contained in:
parent
6d6e7bdf3d
commit
99bc46e7de
|
@ -210,10 +210,28 @@ static void *syncIOConsumerFunc(void *param) {
|
||||||
|
|
||||||
if (pRpcMsg->msgType == SYNC_PING) {
|
if (pRpcMsg->msgType == SYNC_PING) {
|
||||||
if (io->FpOnSyncPing != NULL) {
|
if (io->FpOnSyncPing != NULL) {
|
||||||
SyncPing *pSyncMsg = syncPingBuild(pRpcMsg->contLen);
|
SyncPing *pSyncMsg;
|
||||||
syncPingFromRpcMsg(pRpcMsg, 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);
|
io->FpOnSyncPing(io->pSyncNode, pSyncMsg);
|
||||||
}
|
}
|
||||||
|
|
||||||
} else if (pRpcMsg->msgType == SYNC_PING_REPLY) {
|
} else if (pRpcMsg->msgType == SYNC_PING_REPLY) {
|
||||||
SyncPingReply *pSyncMsg = syncPingReplyBuild(pRpcMsg->contLen);
|
SyncPingReply *pSyncMsg = syncPingReplyBuild(pRpcMsg->contLen);
|
||||||
syncPingReplyFromRpcMsg(pRpcMsg, pSyncMsg);
|
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) {
|
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;
|
SSyncIO *io = pParent;
|
||||||
SRpcMsg *pTemp;
|
SRpcMsg *pTemp;
|
||||||
|
|
Loading…
Reference in New Issue