mirror of https://github.com/ARMmbed/mbed-os.git
BLE - Fix qualification of abort and terminate.
parent
c7169b0638
commit
73f29e7733
|
@ -168,7 +168,7 @@ nRF5xGattClient<EventHandler>::nRF5xGattClient() :
|
||||||
template<class EventHandler>
|
template<class EventHandler>
|
||||||
nRF5xGattClient<EventHandler>::~nRF5xGattClient()
|
nRF5xGattClient<EventHandler>::~nRF5xGattClient()
|
||||||
{
|
{
|
||||||
terminate();
|
this->terminate();
|
||||||
}
|
}
|
||||||
|
|
||||||
template<class EventHandler>
|
template<class EventHandler>
|
||||||
|
@ -484,7 +484,7 @@ struct nRF5xGattClient<EventHandler>::RegularGattProcedure : GattProcedure {
|
||||||
do_handle(gattc_evt);
|
do_handle(gattc_evt);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
abort();
|
this->abort();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -548,7 +548,7 @@ struct nRF5xGattClient<EventHandler>::DiscoverPrimaryServiceProcedure : GattProc
|
||||||
handle_uuid_read(evt.evt.gattc_evt);
|
handle_uuid_read(evt.evt.gattc_evt);
|
||||||
return;
|
return;
|
||||||
default:
|
default:
|
||||||
abort();
|
this->abort();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -633,7 +633,7 @@ struct nRF5xGattClient<EventHandler>::DiscoverPrimaryServiceProcedure : GattProc
|
||||||
{
|
{
|
||||||
response = new(std::nothrow) packed_discovery_response_t[services.size()];
|
response = new(std::nothrow) packed_discovery_response_t[services.size()];
|
||||||
if (!response) {
|
if (!response) {
|
||||||
abort();
|
this->abort();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -658,7 +658,7 @@ struct nRF5xGattClient<EventHandler>::DiscoverPrimaryServiceProcedure : GattProc
|
||||||
|
|
||||||
uint32_t err = sd_ble_gattc_read(connection_handle, attribute_handle, 0);
|
uint32_t err = sd_ble_gattc_read(connection_handle, attribute_handle, 0);
|
||||||
if (err) {
|
if (err) {
|
||||||
abort();
|
this->abort();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -681,7 +681,7 @@ struct nRF5xGattClient<EventHandler>::DiscoverPrimaryServiceProcedure : GattProc
|
||||||
|
|
||||||
if (rsp.handle != expected_handle || rsp.offset != 0 ||
|
if (rsp.handle != expected_handle || rsp.offset != 0 ||
|
||||||
rsp.len != long_uuid_length) {
|
rsp.len != long_uuid_length) {
|
||||||
abort();
|
this->abort();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -844,7 +844,7 @@ struct nRF5xGattClient<EventHandler>::FindIncludedServicesProcedure : RegularGat
|
||||||
size_t buffer_size = element_size * resp.count;
|
size_t buffer_size = element_size * resp.count;
|
||||||
uint8_t* buffer = new(std::nothrow) uint8_t[buffer_size];
|
uint8_t* buffer = new(std::nothrow) uint8_t[buffer_size];
|
||||||
if (!buffer) {
|
if (!buffer) {
|
||||||
abort();
|
this->abort();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -929,7 +929,7 @@ struct nRF5xGattClient<EventHandler>::DiscoverCharacteristicsProcedure : GattPro
|
||||||
handle_uuid_read(evt.evt.gattc_evt);
|
handle_uuid_read(evt.evt.gattc_evt);
|
||||||
return;
|
return;
|
||||||
default:
|
default:
|
||||||
abort();
|
this->abort();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -947,7 +947,7 @@ struct nRF5xGattClient<EventHandler>::DiscoverCharacteristicsProcedure : GattPro
|
||||||
// layout the data structure into a flat byte array.
|
// layout the data structure into a flat byte array.
|
||||||
_response = flatten_response(evt.params.char_disc_rsp);
|
_response = flatten_response(evt.params.char_disc_rsp);
|
||||||
if (!_response.buffer) {
|
if (!_response.buffer) {
|
||||||
abort();
|
this->abort();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -976,7 +976,7 @@ struct nRF5xGattClient<EventHandler>::DiscoverCharacteristicsProcedure : GattPro
|
||||||
|
|
||||||
uint32_t err = sd_ble_gattc_read(connection_handle, attribute_handle, 0);
|
uint32_t err = sd_ble_gattc_read(connection_handle, attribute_handle, 0);
|
||||||
if (err) {
|
if (err) {
|
||||||
abort();
|
this->abort();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -990,7 +990,7 @@ struct nRF5xGattClient<EventHandler>::DiscoverCharacteristicsProcedure : GattPro
|
||||||
{
|
{
|
||||||
// should never happen
|
// should never happen
|
||||||
if (!_response.buffer) {
|
if (!_response.buffer) {
|
||||||
abort();
|
this->abort();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1008,7 +1008,7 @@ struct nRF5xGattClient<EventHandler>::DiscoverCharacteristicsProcedure : GattPro
|
||||||
|
|
||||||
if (rsp.handle != expected_handle || rsp.offset != 0 ||
|
if (rsp.handle != expected_handle || rsp.offset != 0 ||
|
||||||
rsp.len != characteristic_declaration_length) {
|
rsp.len != characteristic_declaration_length) {
|
||||||
abort();
|
this->abort();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1219,7 +1219,7 @@ struct nRF5xGattClient<EventHandler>::ReadAttributeProcedure : RegularGattProced
|
||||||
{
|
{
|
||||||
const ble_gattc_evt_read_rsp_t& rsp = evt.params.read_rsp;
|
const ble_gattc_evt_read_rsp_t& rsp = evt.params.read_rsp;
|
||||||
if (rsp.offset != 0 ) {
|
if (rsp.offset != 0 ) {
|
||||||
abort();
|
this->abort();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1465,7 +1465,7 @@ struct nRF5xGattClient<EventHandler>::QueuePrepareWriteProcedure : RegularGattPr
|
||||||
const ble_gattc_evt_write_rsp_t &response = evt.params.write_rsp;
|
const ble_gattc_evt_write_rsp_t &response = evt.params.write_rsp;
|
||||||
|
|
||||||
if (response.write_op != BLE_GATT_OP_PREP_WRITE_REQ) {
|
if (response.write_op != BLE_GATT_OP_PREP_WRITE_REQ) {
|
||||||
abort();
|
this->abort();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1516,7 +1516,7 @@ struct nRF5xGattClient<EventHandler>::ExecuteWriteQueueProcedure : RegularGattPr
|
||||||
{
|
{
|
||||||
const ble_gattc_evt_write_rsp_t &response = evt.params.write_rsp;
|
const ble_gattc_evt_write_rsp_t &response = evt.params.write_rsp;
|
||||||
if (response.write_op != BLE_GATT_OP_EXEC_WRITE_REQ) {
|
if (response.write_op != BLE_GATT_OP_EXEC_WRITE_REQ) {
|
||||||
abort();
|
this->abort();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -102,7 +102,7 @@ nRF5xSecurityManager<EventHandler>::nRF5xSecurityManager() :
|
||||||
template <class EventHandler>
|
template <class EventHandler>
|
||||||
nRF5xSecurityManager<EventHandler>::~nRF5xSecurityManager()
|
nRF5xSecurityManager<EventHandler>::~nRF5xSecurityManager()
|
||||||
{
|
{
|
||||||
terminate();
|
this->terminate();
|
||||||
}
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
|
@ -486,7 +486,7 @@ struct nRF5xGattClient<EventHandler>::RegularGattProcedure : GattProcedure {
|
||||||
do_handle(gattc_evt);
|
do_handle(gattc_evt);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
abort();
|
this->abort();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -550,7 +550,7 @@ struct nRF5xGattClient<EventHandler>::DiscoverPrimaryServiceProcedure : GattProc
|
||||||
handle_uuid_read(evt.evt.gattc_evt);
|
handle_uuid_read(evt.evt.gattc_evt);
|
||||||
return;
|
return;
|
||||||
default:
|
default:
|
||||||
abort();
|
this->abort();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -635,7 +635,7 @@ struct nRF5xGattClient<EventHandler>::DiscoverPrimaryServiceProcedure : GattProc
|
||||||
{
|
{
|
||||||
response = new(std::nothrow) packed_discovery_response_t[services.size()];
|
response = new(std::nothrow) packed_discovery_response_t[services.size()];
|
||||||
if (!response) {
|
if (!response) {
|
||||||
abort();
|
this->abort();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -660,7 +660,7 @@ struct nRF5xGattClient<EventHandler>::DiscoverPrimaryServiceProcedure : GattProc
|
||||||
|
|
||||||
uint32_t err = sd_ble_gattc_read(connection_handle, attribute_handle, 0);
|
uint32_t err = sd_ble_gattc_read(connection_handle, attribute_handle, 0);
|
||||||
if (err) {
|
if (err) {
|
||||||
abort();
|
this->abort();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -683,7 +683,7 @@ struct nRF5xGattClient<EventHandler>::DiscoverPrimaryServiceProcedure : GattProc
|
||||||
|
|
||||||
if (rsp.handle != expected_handle || rsp.offset != 0 ||
|
if (rsp.handle != expected_handle || rsp.offset != 0 ||
|
||||||
rsp.len != long_uuid_length) {
|
rsp.len != long_uuid_length) {
|
||||||
abort();
|
this->abort();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -846,7 +846,7 @@ struct nRF5xGattClient<EventHandler>::FindIncludedServicesProcedure : RegularGat
|
||||||
size_t buffer_size = element_size * resp.count;
|
size_t buffer_size = element_size * resp.count;
|
||||||
uint8_t* buffer = new(std::nothrow) uint8_t[buffer_size];
|
uint8_t* buffer = new(std::nothrow) uint8_t[buffer_size];
|
||||||
if (!buffer) {
|
if (!buffer) {
|
||||||
abort();
|
this->abort();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -931,7 +931,7 @@ struct nRF5xGattClient<EventHandler>::DiscoverCharacteristicsProcedure : GattPro
|
||||||
handle_uuid_read(evt.evt.gattc_evt);
|
handle_uuid_read(evt.evt.gattc_evt);
|
||||||
return;
|
return;
|
||||||
default:
|
default:
|
||||||
abort();
|
this->abort();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -949,7 +949,7 @@ struct nRF5xGattClient<EventHandler>::DiscoverCharacteristicsProcedure : GattPro
|
||||||
// layout the data structure into a flat byte array.
|
// layout the data structure into a flat byte array.
|
||||||
_response = flatten_response(evt.params.char_disc_rsp);
|
_response = flatten_response(evt.params.char_disc_rsp);
|
||||||
if (!_response.buffer) {
|
if (!_response.buffer) {
|
||||||
abort();
|
this->abort();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -978,7 +978,7 @@ struct nRF5xGattClient<EventHandler>::DiscoverCharacteristicsProcedure : GattPro
|
||||||
|
|
||||||
uint32_t err = sd_ble_gattc_read(connection_handle, attribute_handle, 0);
|
uint32_t err = sd_ble_gattc_read(connection_handle, attribute_handle, 0);
|
||||||
if (err) {
|
if (err) {
|
||||||
abort();
|
this->abort();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -992,7 +992,7 @@ struct nRF5xGattClient<EventHandler>::DiscoverCharacteristicsProcedure : GattPro
|
||||||
{
|
{
|
||||||
// should never happen
|
// should never happen
|
||||||
if (!_response.buffer) {
|
if (!_response.buffer) {
|
||||||
abort();
|
this->abort();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1010,7 +1010,7 @@ struct nRF5xGattClient<EventHandler>::DiscoverCharacteristicsProcedure : GattPro
|
||||||
|
|
||||||
if (rsp.handle != expected_handle || rsp.offset != 0 ||
|
if (rsp.handle != expected_handle || rsp.offset != 0 ||
|
||||||
rsp.len != characteristic_declaration_length) {
|
rsp.len != characteristic_declaration_length) {
|
||||||
abort();
|
this->abort();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1222,7 +1222,7 @@ struct nRF5xGattClient<EventHandler>::ReadAttributeProcedure : RegularGattProced
|
||||||
{
|
{
|
||||||
const ble_gattc_evt_read_rsp_t& rsp = evt.params.read_rsp;
|
const ble_gattc_evt_read_rsp_t& rsp = evt.params.read_rsp;
|
||||||
if (rsp.offset != 0 ) {
|
if (rsp.offset != 0 ) {
|
||||||
abort();
|
this->abort();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1468,7 +1468,7 @@ struct nRF5xGattClient<EventHandler>::QueuePrepareWriteProcedure : RegularGattPr
|
||||||
const ble_gattc_evt_write_rsp_t &response = evt.params.write_rsp;
|
const ble_gattc_evt_write_rsp_t &response = evt.params.write_rsp;
|
||||||
|
|
||||||
if (response.write_op != BLE_GATT_OP_PREP_WRITE_REQ) {
|
if (response.write_op != BLE_GATT_OP_PREP_WRITE_REQ) {
|
||||||
abort();
|
this->abort();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1519,7 +1519,7 @@ struct nRF5xGattClient<EventHandler>::ExecuteWriteQueueProcedure : RegularGattPr
|
||||||
{
|
{
|
||||||
const ble_gattc_evt_write_rsp_t &response = evt.params.write_rsp;
|
const ble_gattc_evt_write_rsp_t &response = evt.params.write_rsp;
|
||||||
if (response.write_op != BLE_GATT_OP_EXEC_WRITE_REQ) {
|
if (response.write_op != BLE_GATT_OP_EXEC_WRITE_REQ) {
|
||||||
abort();
|
this->abort();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -99,7 +99,7 @@ nRF5xSecurityManager<EventHandler>::nRF5xSecurityManager() :
|
||||||
template <class EventHandler>
|
template <class EventHandler>
|
||||||
nRF5xSecurityManager<EventHandler>::~nRF5xSecurityManager()
|
nRF5xSecurityManager<EventHandler>::~nRF5xSecurityManager()
|
||||||
{
|
{
|
||||||
terminate();
|
this->terminate();
|
||||||
}
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
Loading…
Reference in New Issue