From 1429b2d6b9d9abca6375fdea46491d9826251035 Mon Sep 17 00:00:00 2001 From: "matthias.ringwald@gmail.com" Date: Tue, 28 Jan 2014 19:42:15 +0000 Subject: [PATCH] update state before calling function that might read it --- src/l2cap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/l2cap.c b/src/l2cap.c index 2742b371b..1f2878f27 100644 --- a/src/l2cap.c +++ b/src/l2cap.c @@ -617,8 +617,8 @@ static void l2cap_handle_remote_supported_features_received(l2cap_channel_t * ch // we have been waiting for remote supported features, if both support SSP, if (hci_ssp_supported_on_both_sides(channel->handle) && !l2cap_security_level_0_allowed_for_PSM(channel->psm)){ // request security level 2 - gap_request_security_level(channel->handle, LEVEL_2); channel->state = L2CAP_STATE_WAIT_OUTGOING_SECURITY_LEVEL_UPDATE; + gap_request_security_level(channel->handle, LEVEL_2); return; } // fine, go ahead