Skip to content

Commit

Permalink
fix: typo
Browse files Browse the repository at this point in the history
  • Loading branch information
wyfo committed Dec 4, 2024
1 parent e73ce42 commit e55c499
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions src/transport/multicast/rx.c
Original file line number Diff line number Diff line change
Expand Up @@ -193,11 +193,11 @@ z_result_t _z_multicast_handle_transport_message(_z_transport_multicast_t *ztm,
if (_Z_HAS_FLAG(t_msg->_header, _Z_FLAG_T_FRAME_R)) {
// @TODO: amend once reliability is in place. For the time being only
// monotonic SNs are ensured
if (_z_sn_precedes(entry->_sn_res, entry->_sn_rx_sns._val._plain._reliable, t_msg->_body._frame._sn) ==
if (_z_sn_precedes(entry->_sn_res, entry->_sn_rx_sns._val._plain._reliable, t_msg->_body._fragment._sn) ==
true) {
bool consecutive = _z_sn_consecutive(entry->_sn_res, entry->_sn_rx_sns._val._plain._reliable,
t_msg->_body._fragment._sn);
entry->_sn_rx_sns._val._plain._reliable = t_msg->_body._frame._sn;
entry->_sn_rx_sns._val._plain._reliable = t_msg->_body._fragment._sn;
dbuf = &entry->_dbuf_reliable;
if (!consecutive) {
_Z_DEBUG("Non-consecutive fragments received");
Expand All @@ -211,10 +211,10 @@ z_result_t _z_multicast_handle_transport_message(_z_transport_multicast_t *ztm,
}
} else {
if (_z_sn_precedes(entry->_sn_res, entry->_sn_rx_sns._val._plain._best_effort,
t_msg->_body._frame._sn)) {
t_msg->_body._fragment._sn)) {
bool consecutive = _z_sn_consecutive(entry->_sn_res, entry->_sn_rx_sns._val._plain._best_effort,
t_msg->_body._fragment._sn);
entry->_sn_rx_sns._val._plain._best_effort = t_msg->_body._frame._sn;
entry->_sn_rx_sns._val._plain._best_effort = t_msg->_body._fragment._sn;
dbuf = &entry->_dbuf_best_effort;
if (!consecutive) {
_Z_DEBUG("Non-consecutive fragments received");
Expand Down
8 changes: 4 additions & 4 deletions src/transport/unicast/rx.c
Original file line number Diff line number Diff line change
Expand Up @@ -146,10 +146,10 @@ z_result_t _z_unicast_handle_transport_message(_z_transport_unicast_t *ztu, _z_t
if (_Z_HAS_FLAG(t_msg->_header, _Z_FLAG_T_FRAME_R)) {
// @TODO: amend once reliability is in place. For the time being only
// monotonic SNs are ensured
if (_z_sn_precedes(ztu->_sn_res, ztu->_sn_rx_reliable, t_msg->_body._frame._sn)) {
if (_z_sn_precedes(ztu->_sn_res, ztu->_sn_rx_reliable, t_msg->_body._fragment._sn)) {
bool consecutive =
_z_sn_consecutive(ztu->_sn_res, ztu->_sn_rx_reliable, t_msg->_body._fragment._sn);
ztu->_sn_rx_reliable = t_msg->_body._frame._sn;
ztu->_sn_rx_reliable = t_msg->_body._fragment._sn;
dbuf = &ztu->_dbuf_reliable;
if (!consecutive) {
_Z_DEBUG("Non-consecutive fragments received");
Expand All @@ -162,10 +162,10 @@ z_result_t _z_unicast_handle_transport_message(_z_transport_unicast_t *ztu, _z_t
break;
}
} else {
if (_z_sn_precedes(ztu->_sn_res, ztu->_sn_rx_best_effort, t_msg->_body._frame._sn)) {
if (_z_sn_precedes(ztu->_sn_res, ztu->_sn_rx_best_effort, t_msg->_body._fragment._sn)) {
bool consecutive =
_z_sn_consecutive(ztu->_sn_res, ztu->_sn_rx_best_effort, t_msg->_body._fragment._sn);
ztu->_sn_rx_best_effort = t_msg->_body._frame._sn;
ztu->_sn_rx_best_effort = t_msg->_body._fragment._sn;
dbuf = &ztu->_dbuf_best_effort;
if (!consecutive) {
_Z_DEBUG("Non-consecutive fragments received");
Expand Down

0 comments on commit e55c499

Please sign in to comment.