Commit 35f83574 authored by Michel Arruat's avatar Michel Arruat
Browse files

Merge branch 'hotfixes'

parents 79d48d7a f2ffc37f
......@@ -122,17 +122,23 @@ static inline int mstrfip_handle_rx_msg(int new_cycle, uint32_t global_irq)
frame.key = (var_id >> 8) & 0xFF; /* keep agent addr as key */
frame.pdu_type = MSTRFIP_PDU_NONE;
frame.report_tmo = 1;
payload_wsz_org = frame.payload_wsz;
res_msg = mstrfip_handle_rx_frame(MSTRFIP_HMQ_O_APP_APER_MSG, &frame, 0);
/* TODO: this PAIR/IMPAIR need to be understood. We expect to have a
* single control byte MSTRFIP_RP_MSG_ACK */
send_ack = 0;
expect_rpfin = 1;
if( res_msg == MSTRFIP_FRAME_OK )
payload_wsz_org = (frame.acq_payload_bsz / 4) + (!!(frame.acq_payload_bsz % 4));
if ((frame.acq_ctrl_byte == MSTRFIP_RP_MSG_ACK_EVEN) ||
(frame.acq_ctrl_byte == MSTRFIP_RP_MSG_ACK_ODD))
send_ack = 1; /* agent expects an ACK from master */
if (send_ack && (res_msg != MSTRFIP_FRAME_OK)) {
/* frame was wrong no ack from the master and as a consequence
* master will not wait forRP_FIN
* master will not wait for RP_FIN
*/
send_ack = 0;
expect_rpfin = 0;
......@@ -160,7 +166,7 @@ static inline int mstrfip_handle_rx_msg(int new_cycle, uint32_t global_irq)
* We Keep meessage original payload wsz in case something goes wrong
* and invalidation of the data entry is required
*/
payload_wsz_org = frame.payload_wsz;
if (expect_rpfin) { /* wait for RP_FIN from client */
frame.payload_bsz = 3 + 2;
frame.payload_wsz = 2;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment