This commit is contained in:
Hongze Cheng 2021-12-29 12:27:41 +00:00
parent 69acee11ac
commit 96c053c6cf
1 changed files with 17 additions and 6 deletions

View File

@ -55,6 +55,7 @@ void tmsgInitMsgDecoder(SMsgDecoder *pMD, td_endian_t endian, uint8_t *data, int
} }
void tmsgClearMsgDecoder(SMsgDecoder *pMD) { void tmsgClearMsgDecoder(SMsgDecoder *pMD) {
{
struct SMDFreeListNode *pNode; struct SMDFreeListNode *pNode;
for (;;) { for (;;) {
pNode = TD_SLIST_HEAD(&(pMD->freeList)); pNode = TD_SLIST_HEAD(&(pMD->freeList));
@ -63,6 +64,16 @@ void tmsgClearMsgDecoder(SMsgDecoder *pMD) {
free(pNode); free(pNode);
} }
} }
{
struct SMDListNode *pNode;
for (;;) {
pNode = TD_SLIST_HEAD(&(pMD->dStack));
if (TD_IS_NULL(pNode)) break;
TD_SLIST_POP(&(pMD->dStack));
free(pNode);
}
}
}
/* ------------------------ MESSAGE ENCODE/DECODE ------------------------ */ /* ------------------------ MESSAGE ENCODE/DECODE ------------------------ */
int tmsgSVCreateTbReqEncode(SMsgEncoder *pCoder, SVCreateTbReq *pReq) { int tmsgSVCreateTbReqEncode(SMsgEncoder *pCoder, SVCreateTbReq *pReq) {