Bluetooth: Mesh: Fix incorrect flag check in mesh settings
This bug was introduced in PR #31176, where setting's flags were
moved out from bt_mesh.flags to pending_flags.
Signed-off-by: Pavel Vasilyev <pavel.vasilyev@nordicsemi.no>
diff --git a/subsys/bluetooth/mesh/settings.c b/subsys/bluetooth/mesh/settings.c
index 96d2ecc..8f9fdec 100644
--- a/subsys/bluetooth/mesh/settings.c
+++ b/subsys/bluetooth/mesh/settings.c
@@ -100,7 +100,7 @@
timeout_ms = 0;
} else if (atomic_test_bit(pending_flags,
BT_MESH_SETTINGS_RPL_PENDING) &&
- (!(atomic_get(bt_mesh.flags) & GENERIC_PENDING_BITS) ||
+ (!(atomic_get(pending_flags) & GENERIC_PENDING_BITS) ||
(CONFIG_BT_MESH_RPL_STORE_TIMEOUT <
CONFIG_BT_MESH_STORE_TIMEOUT))) {
timeout_ms = CONFIG_BT_MESH_RPL_STORE_TIMEOUT * MSEC_PER_SEC;