bluetooth: gatt: Fix storing subscriptions
Change fixes storing subscriptions in settings. CCC write can interrupt the ccc_delayed_store. Without the change, new CCC was not stored in non-volatile memory and the work that stored CCC was not resubmitted. That resulted in lost subscription after reboot. Fixes: #26862 Signed-off-by: Marek Pieta <Marek.Pieta@nordicsemi.no>
This commit is contained in:
parent
6ecd5e56ed
commit
a6e8cf4374
1 changed files with 1 additions and 1 deletions
|
@ -992,9 +992,9 @@ static void ccc_delayed_store(struct k_work *work)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (bt_addr_le_is_bonded(conn->id, &conn->le.dst)) {
|
if (bt_addr_le_is_bonded(conn->id, &conn->le.dst)) {
|
||||||
|
ccc_store->conn_list[i] = NULL;
|
||||||
bt_gatt_store_ccc(conn->id, &conn->le.dst);
|
bt_gatt_store_ccc(conn->id, &conn->le.dst);
|
||||||
bt_conn_unref(conn);
|
bt_conn_unref(conn);
|
||||||
ccc_store->conn_list[i] = NULL;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue