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

Commit 93f8bba6 authored by Myles Watson's avatar Myles Watson Committed by Gerrit Code Review
Browse files

Merge "SDP: Remove unused SDP_DeleteAttribute" into main

parents 7f5daf40 3ab7d57b
Loading
Loading
Loading
Loading
+0 −15
Original line number Diff line number Diff line
@@ -505,21 +505,6 @@ struct tSdpApi {
     ******************************************************************************/
    bool (*SDP_AddServiceClassIdList)(uint32_t handle, uint16_t num_services,
                                      uint16_t* p_service_uuids);

    /*******************************************************************************

      Function         SDP_DeleteAttribute

      Description      Delete an attribute from a record.
                       This would be through the SDP database maintenance API.

      Parameters:      handle       - (input) Handle to add
                       attr_id      - (input) attribute id to delete

      Returns          true if deleted OK, else false if not found

     ******************************************************************************/
    bool (*SDP_DeleteAttribute)(uint32_t handle, uint16_t attr_id);
  } handle;

  struct {
+0 −12
Original line number Diff line number Diff line
@@ -383,18 +383,6 @@ bool SDP_AddLanguageBaseAttrIDList(uint32_t handle, uint16_t lang,
bool SDP_AddServiceClassIdList(uint32_t handle, uint16_t num_services,
                               uint16_t* p_service_uuids);

/*******************************************************************************
 *
 * Function         SDP_DeleteAttribute
 *
 * Description      Delete an attribute from a record.
 *                  This would be through the SDP database maintenance API.
 *
 * Returns          true if deleted OK, else false if not found
 *
 ******************************************************************************/
bool SDP_DeleteAttribute(uint32_t handle, uint16_t attr_id);

/* Device Identification APIs */

/*******************************************************************************
+0 −1
Original line number Diff line number Diff line
@@ -1091,7 +1091,6 @@ bluetooth::legacy::stack::sdp::tSdpApi api_ = {
            .SDP_AddProfileDescriptorList = ::SDP_AddProfileDescriptorList,
            .SDP_AddLanguageBaseAttrIDList = ::SDP_AddLanguageBaseAttrIDList,
            .SDP_AddServiceClassIdList = ::SDP_AddServiceClassIdList,
            .SDP_DeleteAttribute = ::SDP_DeleteAttribute,
        },
    .device_id =
        {
+0 −27
Original line number Diff line number Diff line
@@ -44,8 +44,6 @@ static bool find_uuid_in_seq(uint8_t* p, uint32_t seq_len,
bool SDP_AddAttribute(uint32_t handle, uint16_t attr_id, uint8_t attr_type,
                      uint32_t attr_len, uint8_t* p_val);

bool SDP_DeleteAttribute(uint32_t handle, uint16_t attr_id);

/*******************************************************************************
 *
 * Function         sdp_db_service_search
@@ -846,31 +844,6 @@ bool SDP_AddServiceClassIdList(uint32_t handle, uint16_t num_services,
  return result;
}

/*******************************************************************************
 *
 * Function         SDP_DeleteAttribute
 *
 * Description      This function is called to delete an attribute from a
 *                  record. This would be through the SDP database maintenance
 *                  API.
 *
 * Returns          true if deleted OK, else false if not found
 *
 ******************************************************************************/
bool SDP_DeleteAttribute(uint32_t handle, uint16_t attr_id) {
  tSDP_RECORD* p_rec = &sdp_cb.server_db.record[0];

  /* Find the record in the database */
  for (uint16_t record_index = 0; record_index < sdp_cb.server_db.num_records; record_index++, p_rec++) {
    if (p_rec->record_handle == handle) {
      SDP_TRACE_API("Deleting attr_id 0x%04x for handle 0x%x", attr_id, handle);
      return SDP_DeleteAttributeFromRecord(p_rec, attr_id);
    }
  }
  /* If here, not found */
  return (false);
}

/*******************************************************************************
 *
 * Function         SDP_DeleteAttributeFromRecord
+0 −7
Original line number Diff line number Diff line
@@ -284,13 +284,6 @@ static const std::vector<std::function<void(FuzzedDataProvider*)>>
          delete[] service_uuids;
        },

        // ::SDP_DeleteAttribute
        [](FuzzedDataProvider* fdp) -> void {
          get_legacy_stack_sdp_api()->handle.SDP_DeleteAttribute(
              getArbitraryVectorElement(fdp, sdp_record_handles, true),
              fdp->ConsumeIntegral<uint16_t>());
        },

        // ::SDP_SetLocalDiRecord
        [](FuzzedDataProvider* fdp) -> void {
          uint32_t handle;  // Output var
Loading