Skip to content

Commit 83579b1

Browse files
authored
Merge pull request #13704 from paul-szczepanek-arm/reset-fix
ble: reset transport last and reset the default chars in gatt server
2 parents 77f3f5e + e9ac83a commit 83579b1

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

connectivity/FEATURE_BLE/source/cordio/source/BLEInstanceBaseImpl.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -171,9 +171,6 @@ ble_error_t BLEInstanceBase::shutdown()
171171
return BLE_ERROR_INITIALIZATION_INCOMPLETE;
172172
}
173173

174-
initialization_status = NOT_INITIALIZED;
175-
_hci_driver->terminate();
176-
177174
#if BLE_FEATURE_GATT_SERVER
178175
getGattServer().reset();
179176
#endif
@@ -185,6 +182,9 @@ ble_error_t BLEInstanceBase::shutdown()
185182
getGap().reset();
186183
_event_queue.clear();
187184

185+
initialization_status = NOT_INITIALIZED;
186+
_hci_driver->terminate();
187+
188188
return BLE_ERROR_NONE;
189189
}
190190

connectivity/FEATURE_BLE/source/cordio/source/GattServerImpl.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -907,6 +907,7 @@ ble_error_t GattServer::reset(ble::GattServer* server)
907907

908908
serviceCount = 0;
909909
characteristicCount = 0;
910+
default_services_added = false;
910911

911912
dataSentCallChain.clear();
912913
dataWrittenCallChain.clear();

0 commit comments

Comments
 (0)