When checking if a read (or write) is authorized can the event contain an invalid handle (Does the handle need to be checked)?
case BLE_GATTS_AUTHORIZE_TYPE_READ:
{
ble_gatts_evt_read_t * p_evt_read = &p_ble_evt>evt.gatts_evt.params.authorize_request.request.read;
// is p_evt_read->handle always a valid handle?
if( authorized() )
{
reply.params.read.gatt_status = BLE_GATT_STATUS_ATTERR_READ_NOT_PERMITTED;
}
else
{
reply.params.read.gatt_status = BLE_GATT_STATUS_SUCCESS;
}
}