Fix passive-roaming tx ack and save device-session order.

We first need to save the device-session and then handle the tx ack, as
else we are overwriting the frame-counter increment.
This commit is contained in:
Orne Brocaar 2022-08-26 12:54:46 +01:00
parent 46bc4d6038
commit 3cf05e8fb9

View File

@ -142,16 +142,16 @@ impl Data {
ctx.update_device_queue_item().await?;
ctx.save_downlink_frame().await?;
if ctx._is_roaming() {
ctx.save_device_session().await?;
ctx.send_downlink_frame_passive_roaming().await?;
ctx.handle_passive_roaming_tx_ack().await?;
} else {
// Some mac-commands set their state (e.g. last requested) to the device-session.
ctx.save_device_session().await?;
ctx.send_downlink_frame().await?;
}
}
// Some mac-commands set their state (e.g. last requested) to the device-session.
ctx.save_device_session().await?;
Ok(())
}