FIX 1.平台固件升级调试;

main
wangbo 1 month ago
parent efbc575beb
commit 1936bbe858

@ -1296,7 +1296,7 @@ int32_t _csg_upgrade_recv(char *pkt)
DBG(DBG_M_PD_CSG, "Receive upgrade file start.\r\n"); DBG(DBG_M_PD_CSG, "Receive upgrade file start.\r\n");
} }
// DBG(DBG_M_PD_CSG,"type=%d,sum=%d,index=%d,len=%d,fix_len=%d\r\n", head_msg->type, head_msg->sum, head_msg->index, head_msg->len, fix_len); DBG(DBG_M_PD_CSG,"type=%d,sum=%d,index=%d,len=%d,fix_len=%d\r\n", head_msg->type, head_msg->sum, head_msg->index, head_msg->len, fix_len);
/* 收包流程 */ /* 收包流程 */
size = head_msg->len; size = head_msg->len;
@ -1322,9 +1322,8 @@ int32_t _csg_upgrade_recv(char *pkt)
ack.index = head_msg->index; ack.index = head_msg->index;
ack.result = FALSE; ack.result = FALSE;
//_csg_send_data(pkt, (char *)&ack, sizeof(csg_ack_t), CSG_REPLY, head->cmd);
memcpy(pkt + sizeof(csg_pkt_head_t), (char *)&ack, sizeof(csg_ack_t)); memcpy(pkt + sizeof(csg_pkt_head_t), (char *)&ack, sizeof(csg_ack_t));
_csg_send_data(CSG_PRV_REPLY, head->cmd, pkt, sizeof(csg_ack_t)); _csg_send_data(CSG_REPLY, head->cmd, pkt, sizeof(csg_ack_t));
return E_SYS_CALL; return E_SYS_CALL;
} }
// if (lseek(fd, offset, SEEK_SET) < 0) // if (lseek(fd, offset, SEEK_SET) < 0)
@ -1344,9 +1343,8 @@ int32_t _csg_upgrade_recv(char *pkt)
ack.index = head_msg->index; ack.index = head_msg->index;
ack.result = FALSE; ack.result = FALSE;
/* 发送应答 */ /* 发送应答 */
//_csg_send_data(pkt, (char *)&ack, sizeof(csg_ack_t), CSG_REPLY, head->cmd);
memcpy(pkt + sizeof(csg_pkt_head_t), (char *)&ack, sizeof(csg_ack_t)); memcpy(pkt + sizeof(csg_pkt_head_t), (char *)&ack, sizeof(csg_ack_t));
_csg_send_data(CSG_PRV_REPLY, head->cmd, pkt, sizeof(csg_ack_t)); _csg_send_data(CSG_REPLY, head->cmd, pkt, sizeof(csg_ack_t));
return E_SYS_CALL; return E_SYS_CALL;
} }
@ -1363,8 +1361,7 @@ int32_t _csg_upgrade_recv(char *pkt)
/* 发送应答 */ /* 发送应答 */
memcpy(pkt + sizeof(csg_pkt_head_t), (char *)&ack, sizeof(csg_ack_t)); memcpy(pkt + sizeof(csg_pkt_head_t), (char *)&ack, sizeof(csg_ack_t));
_csg_send_data(CSG_PRV_REPLY, head->cmd, pkt, sizeof(csg_ack_t)); _csg_send_data(CSG_REPLY, head->cmd, pkt, sizeof(csg_ack_t));
//_csg_send_data(pkt, (char *)&ack, sizeof(csg_ack_t), CSG_REPLY, head->cmd);
return E_NONE; return E_NONE;
} }

Loading…
Cancel
Save