Do not flush dev_ and join_ nonces when updating AppKey for OTAA (#22)

Signed-off-by: SAGAR PATEL <sagar.a.patel@slscorp.com>
This commit is contained in:
SAGAR PATEL 2022-06-07 16:21:04 +05:30 committed by GitHub
parent 3b426471b3
commit 25c71c5483
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -351,6 +351,8 @@ impl DeviceService for Device {
let dk = device_keys::DeviceKeys {
dev_eui: dk.dev_eui,
created_at: dk.created_at,
dev_nonces: dk.dev_nonces,
join_nonce: dk.join_nonce,
nwk_key: AES128Key::from_str(&req_dk.nwk_key).map_err(|e| e.status())?,
app_key: if !req_dk.app_key.is_empty() {
AES128Key::from_str(&req_dk.app_key).map_err(|e| e.status())?