Merge pull request #13704 from paul-szczepanek-arm/reset-fix

ble: reset transport last and reset the default chars in gatt server
pull/13768/head
Martin Kojtal 2020-10-13 11:21:21 +01:00 committed by GitHub
commit 83579b1aa5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 3 deletions

View File

@ -171,9 +171,6 @@ ble_error_t BLEInstanceBase::shutdown()
return BLE_ERROR_INITIALIZATION_INCOMPLETE;
}
initialization_status = NOT_INITIALIZED;
_hci_driver->terminate();
#if BLE_FEATURE_GATT_SERVER
getGattServer().reset();
#endif
@ -185,6 +182,9 @@ ble_error_t BLEInstanceBase::shutdown()
getGap().reset();
_event_queue.clear();
initialization_status = NOT_INITIALIZED;
_hci_driver->terminate();
return BLE_ERROR_NONE;
}

View File

@ -907,6 +907,7 @@ ble_error_t GattServer::reset(ble::GattServer* server)
serviceCount = 0;
characteristicCount = 0;
default_services_added = false;
dataSentCallChain.clear();
dataWrittenCallChain.clear();