OSDN Git Service

RFCOMM: Prevent sending data in BTA_JV_ST_NONE state
authorSrinu Jella <sjella@codeaurora.org>
Mon, 7 Sep 2015 08:10:07 +0000 (13:40 +0530)
committerAndre Eisenbach <eisenbach@google.com>
Fri, 14 Oct 2016 18:35:00 +0000 (18:35 +0000)
commit46069c64199c2ad4c446ecd9e5456381f3a4603d
tree4b87c33c81289b047f6e88796094600ae4b7c9fe
parent23f1d32922447f50e35a4878ed8505491d9e1b97
RFCOMM: Prevent sending data in BTA_JV_ST_NONE state

This patch adds state check in bta_jv_rfcomm_write, to prevent sending
data in BTA_JV_ST_NONE state. This would prevent an ASSERT in the code
due to a null handle. The handle might have already been set to null
during the closing of the RFCOMM connection.

Change-Id: Ibc6b1fb7aa6dce9a4acb52d724af3023fad9a9ae
bta/jv/bta_jv_act.c