aboutsummaryrefslogtreecommitdiff
path: root/stack/sdp/sdp_server.cc
diff options
context:
space:
mode:
Diffstat (limited to 'stack/sdp/sdp_server.cc')
-rw-r--r--stack/sdp/sdp_server.cc22
1 files changed, 5 insertions, 17 deletions
diff --git a/stack/sdp/sdp_server.cc b/stack/sdp/sdp_server.cc
index 1814ba551..50bcfebb3 100644
--- a/stack/sdp/sdp_server.cc
+++ b/stack/sdp/sdp_server.cc
@@ -23,18 +23,18 @@
*
******************************************************************************/
+#include <log/log.h>
#include <string.h>
#include "bt_common.h"
#include "bt_types.h"
-#include "avrc_defs.h"
-#include "device/include/interop.h"
-#include "osi/include/log.h"
#include "osi/include/osi.h"
#include "sdp_api.h"
#include "sdpint.h"
+#if (SDP_SERVER_ENABLED == TRUE)
+
/* Maximum number of bytes to reserve out of SDP MTU for response data */
#define SDP_MAX_SERVICE_RSPHDR_LEN 12
#define SDP_MAX_SERVATTR_RSPHDR_LEN 10
@@ -552,7 +552,6 @@ static void process_service_search_attr_req(tCONN_CB* p_ccb, uint16_t trans_num,
tSDP_RECORD* p_rec;
tSDP_ATTR_SEQ attr_seq, attr_seq_sav;
tSDP_ATTRIBUTE* p_attr;
- tSDP_ATTRIBUTE attr_sav;
bool maxxed_out = false, is_cont = false;
uint8_t* p_seq_start;
uint16_t seq_len, attr_len;
@@ -651,19 +650,6 @@ static void process_service_search_attr_req(tCONN_CB* p_ccb, uint16_t trans_num,
attr_seq.attr_entry[xx].end);
if (p_attr) {
- // Check if the attribute contain AVRCP profile description list
- uint16_t avrcp_version = sdpu_is_avrcp_profile_description_list(p_attr);
- if (avrcp_version > AVRC_REV_1_4 &&
- interop_match_addr(INTEROP_AVRCP_1_4_ONLY,
- &(p_ccb->device_address))) {
- SDP_TRACE_DEBUG(
- "%s, device=%s is only accept AVRCP 1.4, reply AVRCP 1.4 "
- "instead.",
- __func__, p_ccb->device_address.ToString().c_str());
- memcpy(&attr_sav, p_attr, sizeof(tSDP_ATTRIBUTE));
- attr_sav.value_ptr[attr_sav.len - 1] = 0x04;
- p_attr = &attr_sav;
- }
/* Check if attribute fits. Assume 3-byte value type/length */
rem_len = max_list_len - (int16_t)(p_rsp - &p_ccb->rsp_list[0]);
@@ -843,3 +829,5 @@ static void process_service_search_attr_req(tCONN_CB* p_ccb, uint16_t trans_num,
/* Send the buffer through L2CAP */
L2CA_DataWrite(p_ccb->connection_id, p_buf);
}
+
+#endif /* SDP_SERVER_ENABLED == TRUE */