Skip to content

Commit

Permalink
Automatic catchup to commit 431ddff
Browse files Browse the repository at this point in the history
431ddff Correct the accounting of outgoing RPC fragment sizes
44a02f6 Update log message format

Based-On-Commit: 431ddff
Change-Id: I4004bb7ff1ead11877f70880daf6fe7ab6a3b88f
  • Loading branch information
rt-labs bot committed Apr 11, 2024
1 parent 47f2d6b commit 8ebf41e
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 5 deletions.
7 changes: 7 additions & 0 deletions src/device/pf_cmrpc.c
Original file line number Diff line number Diff line change
Expand Up @@ -4740,6 +4740,13 @@ static int pf_cmrpc_dce_packet (

/* Update how much the controller has received (ack'ed) */
p_sess->out_buf_sent_pos += p_sess->out_buf_send_len;
if (p_sess->out_fragment_nbr > 0)
{
/* For all but the first fragment, we have accounted for
* the header size an additional time. Correct that here.
*/
p_sess->out_buf_sent_pos -= PF_CMRPC_PDU_HEADER_SIZE;
}
p_sess->out_fragment_nbr++;

/* The fragment acknowledgment is valid (expected) */
Expand Down
16 changes: 11 additions & 5 deletions src/device/pf_plugsm.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
*/

#include "pf_includes.h"
#include <inttypes.h>

void pf_plugsm_released_alarm_req (
pnet_t * net,
Expand Down Expand Up @@ -62,7 +63,8 @@ void pf_plugsm_released_alarm_req (
LOG_DEBUG (
PNET_LOG,
"PLUGSM(%d): Queued released alarm.\n"
" AREP: %u, API: %u, Slot: 0x%x, Subslot: 0x%x\n",
" AREP: %" PRIu16 ", API: %" PRIu32 ", Slot: 0x%" PRIx16
", Subslot: 0x%" PRIx16 "\n",
__LINE__,
ar->arep,
api,
Expand All @@ -76,7 +78,8 @@ void pf_plugsm_released_alarm_req (
LOG_DEBUG (
PNET_LOG,
"PLUGSM(%d): Sending released alarm to controller.\n"
" AREP: %u, API: %u, Slot: 0x%x, Subslot: 0x%x\n",
" AREP: %" PRIu16 ", API: %" PRIu32 ", Slot: 0x%" PRIx16
", Subslot: 0x%" PRIx16 "\n",
__LINE__,
ar->arep,
plug->queue[plug->current].api,
Expand Down Expand Up @@ -154,7 +157,8 @@ void pf_plugsm_application_ready_req (pnet_t * net, pf_ar_t * ar)
LOG_DEBUG (
PNET_LOG,
"PLUGSM(%d): Sending application ready to controller.\n"
" AREP: %u, API: %u, Slot: 0x%x, Subslot: 0x%x\n",
" AREP: %" PRIu16 ", API: %" PRIu32 ", Slot: 0x%" PRIx16
", Subslot: 0x%" PRIx16 "\n",
__LINE__,
ar->arep,
plug->queue[plug->current].api,
Expand Down Expand Up @@ -182,7 +186,8 @@ int pf_plugsm_application_ready_cnf (pnet_t * net, pf_ar_t * ar)
LOG_DEBUG (
PNET_LOG,
"PLUGSM(%d): Application ready confirmed by controller.\n"
" AREP: %u, API: %u, Slot: 0x%x, Subslot: 0x%x\n",
" AREP: %" PRIu16 ", API: %" PRIu32 ", Slot: 0x%" PRIx16
", Subslot: 0x%" PRIx16 "\n",
__LINE__,
ar->arep,
plug->queue[plug->current].api,
Expand All @@ -202,7 +207,8 @@ int pf_plugsm_application_ready_cnf (pnet_t * net, pf_ar_t * ar)
LOG_DEBUG (
PNET_LOG,
"PLUGSM(%d): Sending released alarm to controller.\n"
" AREP: %u, API: %u, Slot: 0x%x, Subslot: 0x%x\n",
" AREP: %" PRIu16 ", API: %" PRIu32 ", Slot: 0x%" PRIx16
", Subslot: 0x%" PRIx16 "\n",
__LINE__,
ar->arep,
plug->queue[plug->current].api,
Expand Down

0 comments on commit 8ebf41e

Please sign in to comment.