summaryrefslogtreecommitdiffstats
path: root/stack/btm/btm_sec.c
diff options
context:
space:
mode:
authorSrinu Jella <sjella@codeaurora.org>2015-09-24 13:23:36 +0530
committerLinux Build Service Account <lnxbuild@localhost>2015-10-06 03:22:22 -0600
commit970a162b0721e44a228c473ef5f504c6a72f41d2 (patch)
tree201deac81cdf1fea3923c4f98f239550b6838f18 /stack/btm/btm_sec.c
parent16b7ffbe725e9a8b1cb18c709c0d39a4726dcae2 (diff)
downloadandroid_system_bt-970a162b0721e44a228c473ef5f504c6a72f41d2.tar.gz
android_system_bt-970a162b0721e44a228c473ef5f504c6a72f41d2.tar.bz2
android_system_bt-970a162b0721e44a228c473ef5f504c6a72f41d2.zip
Bluetooth: Don't process pair request when controller is not ready
- Don't process pair request when controller module of host is not ready as it may lead to trigger assert. - This could happen when one application is trying to pair and other application is turning off bluetooth. CRs-Fixed: 904823 Change-Id: I72c72f6b5545c845e79874212359854023ffad98
Diffstat (limited to 'stack/btm/btm_sec.c')
-rw-r--r--stack/btm/btm_sec.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/stack/btm/btm_sec.c b/stack/btm/btm_sec.c
index 77fe95cb2..c8b29b78e 100644
--- a/stack/btm/btm_sec.c
+++ b/stack/btm/btm_sec.c
@@ -1128,7 +1128,11 @@ tBTM_STATUS btm_sec_bond_by_transport (BD_ADDR bd_addr, tBT_TRANSPORT transport,
{
return(BTM_NO_RESOURCES);
}
-
+ else if (!controller_get_interface()->get_is_ready())
+ {
+ BTM_TRACE_ERROR ("Controller module is not ready");
+ return(BTM_NO_RESOURCES);
+ }
BTM_TRACE_DEBUG ("before update sec_flags=0x%x", p_dev_rec->sec_flags);
/* Finished if connection is active and already paired */