Skip to content

Commit b306015

Browse files
adigieArekBalysNordic
authored andcommitted
applications: matter_bridge: Revert loading of UniqueID from old scheme
Revert add loading of UniqueID from old data scheme. Signed-off-by: Adrian Gielniewski <[email protected]>
1 parent f4e6aaf commit b306015

File tree

2 files changed

+0
-45
lines changed

2 files changed

+0
-45
lines changed

samples/matter/common/src/bridge/bridge_storage_manager.cpp

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -70,11 +70,6 @@ bool BridgeStorageManager::MigrateData()
7070
return false;
7171
}
7272

73-
if (!LoadBridgedDeviceUniqueID(device.mUniqueID, sizeof(device.mUniqueID),
74-
device.mUniqueIDLength, i)) {
75-
return false;
76-
}
77-
7873
/* Ignore an error, as node label is optional, so it may not be found. */
7974
if (!LoadBridgedDeviceNodeLabel(device.mNodeLabel, sizeof(device.mNodeLabel),
8075
device.mNodeLabelLength, i)) {
@@ -104,7 +99,6 @@ bool BridgeStorageManager::MigrateData()
10499

105100
/* Remove all information described using an old scheme. */
106101
RemoveBridgedDeviceEndpointId(i);
107-
RemoveBridgedDeviceUniqueID(i);
108102
RemoveBridgedDeviceNodeLabel(i);
109103
RemoveBridgedDeviceType(i);
110104

@@ -166,21 +160,6 @@ bool BridgeStorageManager::RemoveBridgedDeviceEndpointId(uint8_t bridgedDeviceIn
166160
return Nrf::GetPersistentStorage().NonSecureRemove(&id);
167161
}
168162

169-
bool BridgeStorageManager::LoadBridgedDeviceUniqueID(char *uniqueID, size_t uniqueIDMaxLength, size_t &uniqueIDLength,
170-
uint8_t bridgedDeviceIndex)
171-
{
172-
Nrf::PersistentStorageNode id = CreateIndexNode(bridgedDeviceIndex, &mBridgedDeviceUniqueID);
173-
174-
return Nrf::GetPersistentStorage().NonSecureLoad(&id, uniqueID, uniqueIDMaxLength, uniqueIDLength);
175-
}
176-
177-
bool BridgeStorageManager::RemoveBridgedDeviceUniqueID(uint8_t bridgedDeviceIndex)
178-
{
179-
Nrf::PersistentStorageNode id = CreateIndexNode(bridgedDeviceIndex, &mBridgedDeviceUniqueID);
180-
181-
return Nrf::GetPersistentStorage().NonSecureRemove(&id);
182-
}
183-
184163
bool BridgeStorageManager::LoadBridgedDeviceNodeLabel(char *label, size_t labelMaxLength, size_t &labelLength,
185164
uint8_t bridgedDeviceIndex)
186165
{

samples/matter/common/src/bridge/bridge_storage_manager.h

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,6 @@ class BridgeStorageManager {
5252
mBridgedDevicesIndexes("brd_ids", strlen("brd_ids"), &mBridge),
5353
mBridgedDevice("brd", strlen("brd"), &mBridge), mVersion("ver", strlen("ver"), &mBridge),
5454
mBridgedDeviceEndpointId("eid", strlen("eid"), &mBridgedDevice),
55-
mBridgedDeviceUniqueID("unique_id", strlen("unique_id"), &mBridgedDevice),
5655
mBridgedDeviceNodeLabel("label", strlen("label"), &mBridgedDevice),
5756
mBridgedDeviceType("type", strlen("type"), &mBridgedDevice)
5857
#ifdef CONFIG_BRIDGED_DEVICE_BT
@@ -186,28 +185,6 @@ class BridgeStorageManager {
186185
*/
187186
bool RemoveBridgedDeviceEndpointId(uint8_t bridgedDeviceIndex);
188187

189-
/**
190-
* @brief Load bridged device UniqueID from settings
191-
*
192-
* @param uniqueID address of char array to be filled with loaded data
193-
* @param uniqueIDMaxLength maximum size that can be used for UniqueID array
194-
* @param uniqueIDLength reference to the uniqueIDLength object to be filled with size of actually loaded data
195-
* @param bridgedDeviceIndex index describing specific bridged device using given uniqueID
196-
* @return true if key has been loaded successfully
197-
* @return false an error occurred
198-
*/
199-
bool LoadBridgedDeviceUniqueID(char *uniqueID, size_t uniqueIDMaxLength, size_t &uniqueIDLength,
200-
uint8_t bridgedDeviceIndex);
201-
202-
/**
203-
* @brief Remove bridged device's UniqueID entry from settings
204-
*
205-
* @param bridgedDeviceIndex index describing specific bridged device's UniqueID to be removed
206-
* @return true if key entry has been removed successfully
207-
* @return false an error occurred
208-
*/
209-
bool RemoveBridgedDeviceUniqueID(uint8_t bridgedDeviceIndex);
210-
211188
/**
212189
* @brief Load bridged device node label from settings
213190
*
@@ -281,7 +258,6 @@ class BridgeStorageManager {
281258
/* The below fields are deprecated and used only for the migration purposes between the older scheme versions.
282259
*/
283260
Nrf::PersistentStorageNode mBridgedDeviceEndpointId;
284-
Nrf::PersistentStorageNode mBridgedDeviceUniqueID;
285261
Nrf::PersistentStorageNode mBridgedDeviceNodeLabel;
286262
Nrf::PersistentStorageNode mBridgedDeviceType;
287263
#ifdef CONFIG_BRIDGED_DEVICE_BT

0 commit comments

Comments
 (0)