Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e641e63e authored by Henri Chataing's avatar Henri Chataing
Browse files

gd: Fix typo in ErrorCode::UNSUPORTED_FEATURE_OR_PARAMETER_VALUE

Test: build libbluetooth
Change-Id: I1e5a5a5ad4174f7ba603045dc19dab436cf4554d
parent 86b70880
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -803,7 +803,7 @@ enum ErrorCode: 8 {
  CONNECTION_REJECTED_SECURITY_REASONS = 0x0E,
  CONNECTION_REJECTED_UNACCEPTABLE_BD_ADDR = 0x0F,
  CONNECTION_ACCEPT_TIMEOUT = 0x10,
  UNSUPORTED_FEATURE_OR_PARAMETER_VALUE = 0x11,
  UNSUPPORTED_FEATURE_OR_PARAMETER_VALUE = 0x11,
  INVALID_HCI_COMMAND_PARAMETERS = 0x12,
  REMOTE_USER_TERMINATED_CONNECTION = 0x13,
  REMOTE_DEVICE_TERMINATED_CONNECTION_LOW_RESOURCES = 0x14,
+1 −1
Original line number Diff line number Diff line
@@ -1017,7 +1017,7 @@ struct LeScanningManager::impl : public bluetooth::hci::LeAddressManagerCallback
  void batch_scan_read_results(ScannerId scanner_id, uint16_t total_num_of_records, BatchScanMode scan_mode) {
    if (!is_batch_scan_support_) {
      LOG_WARN("Batch scan is not supported");
      int status = static_cast<int>(ErrorCode::UNSUPORTED_FEATURE_OR_PARAMETER_VALUE);
      int status = static_cast<int>(ErrorCode::UNSUPPORTED_FEATURE_OR_PARAMETER_VALUE);
      scanning_callbacks_->OnBatchScanReports(scanner_id, status, 0, 0, {});
      return;
    }
+2 −2
Original line number Diff line number Diff line
@@ -180,9 +180,9 @@ inline tHCI_STATUS ToLegacyHciErrorCode(const hci::ErrorCode& reason) {
      return HCI_ERR_HOST_REJECT_DEVICE;
    case hci::ErrorCode::CONNECTION_ACCEPT_TIMEOUT:
      return HCI_ERR_HOST_TIMEOUT;
    case hci::ErrorCode::UNSUPORTED_FEATURE_OR_PARAMETER_VALUE:
    case hci::ErrorCode::UNSUPPORTED_FEATURE_OR_PARAMETER_VALUE:
      return static_cast<tHCI_STATUS>(
          hci::ErrorCode::UNSUPORTED_FEATURE_OR_PARAMETER_VALUE);
          hci::ErrorCode::UNSUPPORTED_FEATURE_OR_PARAMETER_VALUE);
    case hci::ErrorCode::INVALID_HCI_COMMAND_PARAMETERS:
      return HCI_ERR_ILLEGAL_PARAMETER_FMT;
    case hci::ErrorCode::REMOTE_USER_TERMINATED_CONNECTION:
+6 −5
Original line number Diff line number Diff line
@@ -1603,11 +1603,12 @@ void DualModeController::LeSetHostFeature(CommandView command) {
  auto command_view = gd_hci::LeSetHostFeatureView::Create(command);
  ASSERT(command_view.IsValid());
  // TODO: if the controller has active connections, return COMMAND_DISALLOED
  ErrorCode error_code = properties_.SetLeHostFeature(
  ErrorCode error_code =
      properties_.SetLeHostFeature(
          static_cast<uint8_t>(command_view.GetBitNumber()),
          static_cast<uint8_t>(command_view.GetBitValue()))
          ? ErrorCode::SUCCESS
                             : ErrorCode::UNSUPORTED_FEATURE_OR_PARAMETER_VALUE;
          : ErrorCode::UNSUPPORTED_FEATURE_OR_PARAMETER_VALUE;
  send_event_(bluetooth::hci::LeSetHostFeatureCompleteBuilder::Create(
      kNumCommandPackets, error_code));
}