From c42e2ff2264ce7fff920cd8f7609178ae1dd208a Mon Sep 17 00:00:00 2001 From: "matthias.ringwald@gmail.com" Date: Sun, 19 Jan 2014 17:14:03 +0000 Subject: [PATCH] clear ATT and SM protocol handlers on l2cap_init() --- src/l2cap.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/l2cap.c b/src/l2cap.c index b484dcdc1..fb325f8f7 100644 --- a/src/l2cap.c +++ b/src/l2cap.c @@ -72,13 +72,13 @@ static void l2cap_packet_handler(uint8_t packet_type, uint8_t *packet, uint16_t static l2cap_signaling_response_t signaling_responses[NR_PENDING_SIGNALING_RESPONSES]; static int signaling_responses_pending; -static linked_list_t l2cap_channels = NULL; -static linked_list_t l2cap_services = NULL; +static linked_list_t l2cap_channels; +static linked_list_t l2cap_services; static void (*packet_handler) (void * connection, uint8_t packet_type, uint16_t channel, uint8_t *packet, uint16_t size) = null_packet_handler; static int new_credits_blocked = 0; -static btstack_packet_handler_t attribute_protocol_packet_handler = NULL; -static btstack_packet_handler_t security_protocol_packet_handler = NULL; +static btstack_packet_handler_t attribute_protocol_packet_handler; +static btstack_packet_handler_t security_protocol_packet_handler; // prototypes static void l2cap_finialize_channel_close(l2cap_channel_t *channel); @@ -97,7 +97,9 @@ void l2cap_init(){ l2cap_services = NULL; packet_handler = null_packet_handler; - + attribute_protocol_packet_handler = NULL; + security_protocol_packet_handler = NULL; + // // register callback with HCI //