fix: invalid read in mbnode test

This commit is contained in:
Shengliang Guan 2022-05-12 23:04:25 +08:00
parent 823691b6b2
commit 5257e812d9
2 changed files with 6 additions and 2 deletions

View File

@ -19,7 +19,11 @@
static SMsgCb tsDefaultMsgCb;
void tmsgSetDefaultMsgCb(const SMsgCb* pMsgCb) { tsDefaultMsgCb = *pMsgCb; }
void tmsgSetDefaultMsgCb(const SMsgCb* pMsgCb) {
if (tsDefaultMsgCb.pWrapper == NULL) {
tsDefaultMsgCb = *pMsgCb;
}
}
int32_t tmsgPutToQueue(const SMsgCb* pMsgCb, EQueueType qtype, SRpcMsg* pReq) {
PutToQueueFp fp = pMsgCb->queueFps[qtype];

View File

@ -33,7 +33,7 @@ static void mmProcessQueue(SQueueInfo *pInfo, SNodeMsg *pMsg) {
int32_t code = -1;
tmsg_t msgType = pMsg->rpcMsg.msgType;
bool isRequest = msgType & 1U;
dTrace("msg:%p, get from mnode queue", pMsg);
dTrace("msg:%p, get from mnode queue, type:%s", pMsg, TMSG_INFO(msgType));
switch (msgType) {
case TDMT_DND_ALTER_MNODE: