mirror of https://github.com/ARMmbed/mbed-os.git
Merge pull request #13704 from paul-szczepanek-arm/reset-fix
ble: reset transport last and reset the default chars in gatt serverpull/13768/head
commit
83579b1aa5
|
@ -171,9 +171,6 @@ ble_error_t BLEInstanceBase::shutdown()
|
||||||
return BLE_ERROR_INITIALIZATION_INCOMPLETE;
|
return BLE_ERROR_INITIALIZATION_INCOMPLETE;
|
||||||
}
|
}
|
||||||
|
|
||||||
initialization_status = NOT_INITIALIZED;
|
|
||||||
_hci_driver->terminate();
|
|
||||||
|
|
||||||
#if BLE_FEATURE_GATT_SERVER
|
#if BLE_FEATURE_GATT_SERVER
|
||||||
getGattServer().reset();
|
getGattServer().reset();
|
||||||
#endif
|
#endif
|
||||||
|
@ -185,6 +182,9 @@ ble_error_t BLEInstanceBase::shutdown()
|
||||||
getGap().reset();
|
getGap().reset();
|
||||||
_event_queue.clear();
|
_event_queue.clear();
|
||||||
|
|
||||||
|
initialization_status = NOT_INITIALIZED;
|
||||||
|
_hci_driver->terminate();
|
||||||
|
|
||||||
return BLE_ERROR_NONE;
|
return BLE_ERROR_NONE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -907,6 +907,7 @@ ble_error_t GattServer::reset(ble::GattServer* server)
|
||||||
|
|
||||||
serviceCount = 0;
|
serviceCount = 0;
|
||||||
characteristicCount = 0;
|
characteristicCount = 0;
|
||||||
|
default_services_added = false;
|
||||||
|
|
||||||
dataSentCallChain.clear();
|
dataSentCallChain.clear();
|
||||||
dataWrittenCallChain.clear();
|
dataWrittenCallChain.clear();
|
||||||
|
|
Loading…
Reference in New Issue