Improved debugging output.
FossilOrigin-Name: f28669afe1de17cdefdbd23e38ed1797eea1f547c59544a370e6a6842d187e2a
This commit is contained in:
parent
bb8257d830
commit
40644f990e
@ -39,11 +39,14 @@ static void readsubelems_wtp_board_data(mbag_t itemstore, uint8_t * msgelem,
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
int i = 0;
|
int i = 0;
|
||||||
uint32_t val;
|
// uint32_t val;
|
||||||
do {
|
do {
|
||||||
val = ntohl(*((uint32_t *) (msgelem + i)));
|
// val = ntohl(*((uint32_t *) (msgelem + i)));
|
||||||
int subtype = (val >> 16) & 0xffff;
|
// int subtype = (val >> 16) & 0xffff;
|
||||||
int sublen = val & 0xffff;
|
// int sublen = val & 0xffff;
|
||||||
|
//
|
||||||
|
int subtype = cw_get_word(msgelem+i);
|
||||||
|
int sublen = cw_get_word(msgelem+i+2);
|
||||||
i += 4;
|
i += 4;
|
||||||
if (sublen + i > len) {
|
if (sublen + i > len) {
|
||||||
cw_dbg(DBG_ELEM_ERR,
|
cw_dbg(DBG_ELEM_ERR,
|
||||||
@ -52,8 +55,10 @@ static void readsubelems_wtp_board_data(mbag_t itemstore, uint8_t * msgelem,
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
cw_dbg(DBG_SUBELEM, "Reading WTP board data sub-element, type=%d, len=%d",
|
cw_dbg(DBG_SUBELEM, "board data sub-element, type=%d (%s), len=%d",
|
||||||
subtype, sublen);
|
subtype, cw_strboardelem(subtype),sublen);
|
||||||
|
|
||||||
|
cw_dbg_dmp(DBG_SUBELEM,msgelem+i,sublen,"Dump...");
|
||||||
|
|
||||||
switch (subtype) {
|
switch (subtype) {
|
||||||
case CW_BOARDDATA_MODELNO:
|
case CW_BOARDDATA_MODELNO:
|
||||||
|
Loading…
Reference in New Issue
Block a user