From 4e7ad8eed86d69ebaa9f2ccdb652ef4dfa55607d Mon Sep 17 00:00:00 2001 From: Kristian Sloth Lauszus Date: Mon, 4 Feb 2013 16:17:46 +0100 Subject: [PATCH] Fixed potential bug --- SPP.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/SPP.cpp b/SPP.cpp index 15c5c9fc..86837bd1 100644 --- a/SPP.cpp +++ b/SPP.cpp @@ -425,7 +425,8 @@ void SPP::SDP_task() { #endif pBtd->l2cap_disconnection_response(hci_handle,identifier,sdp_dcid,sdp_scid); l2cap_sdp_state = L2CAP_SDP_WAIT; - } + } else if(l2cap_connection_request_sdp_flag) + l2cap_rfcomm_state = L2CAP_SDP_WAIT; break; case L2CAP_DISCONNECT_RESPONSE: // This is for both disconnection response from the RFCOMM and SDP channel if they were connected if (l2cap_disconnect_response_flag) { @@ -494,7 +495,8 @@ void SPP::RFCOMM_task() #endif pBtd->l2cap_disconnection_response(hci_handle,identifier,rfcomm_dcid,rfcomm_scid); l2cap_rfcomm_state = L2CAP_RFCOMM_WAIT; - } + } else if(l2cap_connection_request_rfcomm_flag) + l2cap_rfcomm_state = L2CAP_RFCOMM_WAIT; break; } }