Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix fabric index management in the fabric table. (#16587)
* Fix fabric index management in the fabric table. Before this change, the fabric index for a fabric table entry had to match its offset in the table. Therefore we only used indices up to CHIP_CONFIG_MAX_FABRICS and then looped back around to index 1. Furthermore, we did not use to persist our mNextAvailableFabricIndex, so after a restart would start assigning fabric indices that corresponded to deleted fabrics, instead of not-yet-used ones, even if we had not yet exceeded CHIP_CONFIG_MAX_FABRICS total commissioning events. This change decouples the fabric index from the table offset. We now store the list of fabric indices used and the fabric index we should use for the next time a fabric is added. * Fix TestCASESession compilation. * Address review comments.
- Loading branch information