FIX 1.解决和管理工具通信的一个段错误;

main
wangbo 1 year ago
parent 9616c83339
commit 46632bab65

@ -592,11 +592,11 @@ int32_t _debug_pkt_process(char *buf, int32_t len)
LD_E_RETURN(DBG_M_CA_DBG, _debug_pkt_check(buf, len)); LD_E_RETURN(DBG_M_CA_DBG, _debug_pkt_check(buf, len));
msg_proc_t *ptable = &dbg_proc_table[0]; msg_proc_t *ptable = &dbg_proc_table[0];
for (; DEBUG_INVALID != head->cmd; ptable++) for (; ptable->uiMsgId < DEBUG_INVALID; ptable++)
{ {
DBG(DBG_M_CA_DBG, "cmd = 0x%x, id = 0x%x, fxn=%p\n", head->cmd, ptable->uiMsgId, ptable->pfMsgProcFxn);
if (head->cmd == ptable->uiMsgId) if (head->cmd == ptable->uiMsgId)
{ {
//printf("cmd = 0x%x\n", head->cmd);
if (ptable->pfMsgProcFxn) if (ptable->pfMsgProcFxn)
{ {
debug_msg_info_t msg = {0}; debug_msg_info_t msg = {0};
@ -604,8 +604,8 @@ int32_t _debug_pkt_process(char *buf, int32_t len)
msg.len = head->len; msg.len = head->len;
msg.pbuf = buf + DEBUG_PKT_DATA_POS; msg.pbuf = buf + DEBUG_PKT_DATA_POS;
ptable->pfMsgProcFxn(&msg); ptable->pfMsgProcFxn(&msg);
break;
} }
break;
} }
} }
return E_NONE; return E_NONE;

Loading…
Cancel
Save