fix: invalid read in mbnode test
This commit is contained in:
parent
823691b6b2
commit
5257e812d9
|
@ -19,7 +19,11 @@
|
||||||
|
|
||||||
static SMsgCb tsDefaultMsgCb;
|
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) {
|
int32_t tmsgPutToQueue(const SMsgCb* pMsgCb, EQueueType qtype, SRpcMsg* pReq) {
|
||||||
PutToQueueFp fp = pMsgCb->queueFps[qtype];
|
PutToQueueFp fp = pMsgCb->queueFps[qtype];
|
||||||
|
|
|
@ -33,7 +33,7 @@ static void mmProcessQueue(SQueueInfo *pInfo, SNodeMsg *pMsg) {
|
||||||
int32_t code = -1;
|
int32_t code = -1;
|
||||||
tmsg_t msgType = pMsg->rpcMsg.msgType;
|
tmsg_t msgType = pMsg->rpcMsg.msgType;
|
||||||
bool isRequest = msgType & 1U;
|
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) {
|
switch (msgType) {
|
||||||
case TDMT_DND_ALTER_MNODE:
|
case TDMT_DND_ALTER_MNODE:
|
||||||
|
|
Loading…
Reference in New Issue