From 1ce7a558b15dc86de85387b1612b4e1c1c0d1755 Mon Sep 17 00:00:00 2001 From: "matthias.ringwald@gmail.com" Date: Mon, 6 Jan 2014 18:44:45 +0000 Subject: [PATCH] track authorization result --- ble/att_server.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/ble/att_server.c b/ble/att_server.c index 2a0a5a780..51446d90c 100644 --- a/ble/att_server.c +++ b/ble/att_server.c @@ -141,6 +141,15 @@ static void att_event_packet_handler (uint8_t packet_type, uint16_t channel, uin att_ir_central_device_db_index = -1; att_run(); break; + + case SM_AUTHORIZATION_RESULT: { + sm_event_t * event = (sm_event_t *) packet; + if (event->addr_type != att_client_addr_type) break; + if (memcmp(event->address, att_client_address, 6) != 0) break; + att_connection.authenticated = event->authorization_result; + break; + } + default: break; }