From f08f6ff2f7dbfad0cc72ec4f1ad088953e23056a Mon Sep 17 00:00:00 2001 From: Matthias Ringwald Date: Sun, 15 Nov 2015 14:04:48 +0100 Subject: [PATCH] drop sdp packet handler --- platform/daemon/src/daemon.c | 1 - src/classic/sdp.c | 10 ---------- src/classic/sdp.h | 2 -- 3 files changed, 13 deletions(-) diff --git a/platform/daemon/src/daemon.c b/platform/daemon/src/daemon.c index dd8f70de0..75d4314a4 100644 --- a/platform/daemon/src/daemon.c +++ b/platform/daemon/src/daemon.c @@ -1937,7 +1937,6 @@ int main (int argc, char * const * argv){ #ifdef HAVE_SDP sdp_init(); - sdp_register_packet_handler(&daemon_packet_handler); #endif #ifdef HAVE_BLE diff --git a/src/classic/sdp.c b/src/classic/sdp.c index 4073453e0..3cca65273 100644 --- a/src/classic/sdp.c +++ b/src/classic/sdp.c @@ -68,9 +68,6 @@ static uint32_t sdp_next_service_record_handle = ((uint32_t) maxReservedServiceR static uint8_t sdp_response_buffer[SDP_RESPONSE_BUFFER_SIZE]; -static void (*app_packet_handler)(void * connection, uint8_t packet_type, - uint16_t channel, uint8_t *packet, uint16_t size) = NULL; - static uint16_t l2cap_cid = 0; static uint16_t sdp_response_size = 0; @@ -79,13 +76,6 @@ void sdp_init(void){ l2cap_register_service(sdp_packet_handler, PSM_SDP, 0xffff, LEVEL_0); } -// register packet handler -void sdp_register_packet_handler(void (*handler)(void * connection, uint8_t packet_type, - uint16_t channel, uint8_t *packet, uint16_t size)){ - app_packet_handler = handler; - l2cap_cid = 0; -} - uint32_t sdp_get_service_record_handle(uint8_t * record){ uint8_t * serviceRecordHandleAttribute = sdp_get_attribute_value_for_attribute_id(record, SDP_ServiceRecordHandle); if (!serviceRecordHandleAttribute) return 0; diff --git a/src/classic/sdp.h b/src/classic/sdp.h index 81a7100ab..182bec918 100644 --- a/src/classic/sdp.h +++ b/src/classic/sdp.h @@ -80,8 +80,6 @@ int sdp_handle_service_search_attribute_request(uint8_t * packet, uint16_t remot */ void sdp_init(void); -void sdp_register_packet_handler(void (*handler)(void * connection, uint8_t packet_type, uint16_t channel, uint8_t *packet, uint16_t size)); - #ifdef EMBEDDED /** * @brief Register service record internally - this version doesn't copy the record therefore it must be forever accessible. Preconditions: