summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorzzy <zhenye@broadcom.com>2012-04-16 15:12:44 -0700
committerMatthew Xie <mattx@google.com>2012-07-14 11:19:18 -0700
commitc399ab396710f7d32ed77d8309e6f77dcccd8376 (patch)
treeca97a96a380d39a6c5e8f0f151192a5f4ad3a1fb
parent699e4626908b9395cea00a59903d63b3cb91ac17 (diff)
downloadexternal_bluetooth_bluedroid-c399ab396710f7d32ed77d8309e6f77dcccd8376.zip
external_bluetooth_bluedroid-c399ab396710f7d32ed77d8309e6f77dcccd8376.tar.gz
external_bluetooth_bluedroid-c399ab396710f7d32ed77d8309e6f77dcccd8376.tar.bz2
fixed rfc server connection close issue
Change-Id: Idd40aa3ee44740d551102af8217c185f2b1b89ad
-rw-r--r--bta/jv/bta_jv_act.c18
1 files changed, 6 insertions, 12 deletions
diff --git a/bta/jv/bta_jv_act.c b/bta/jv/bta_jv_act.c
index 83a9a05..795c4db 100644
--- a/bta/jv/bta_jv_act.c
+++ b/bta/jv/bta_jv_act.c
@@ -2040,20 +2040,14 @@ static void bta_jv_port_mgmt_sr_cback(UINT32 code, UINT16 port_handle)
{
evt_data.rfc_close.async = FALSE;
}
- p_pcb->state = BTA_JV_ST_SR_LISTEN;
p_pcb->cong = FALSE;
p_cback = p_cb->p_cback;
- num = bta_jv_get_num_rfc_listen(p_cb);
- APPL_TRACE_DEBUG1( "num:%d",num);
- if (num > 1)
- {
- APPL_TRACE_DEBUG1( "removing rfc handle:0x%x", p_pcb->handle);
- si = BTA_JV_RFC_HDL_TO_SIDX(p_pcb->handle);
- p_cb->rfc_hdl[si] = 0;
- p_pcb->state = BTA_JV_ST_NONE;
- p_pcb->handle = 0;
- RFCOMM_RemoveServer(port_handle);
- }
+ APPL_TRACE_DEBUG1( "removing rfc handle:0x%x", p_pcb->handle);
+ si = BTA_JV_RFC_HDL_TO_SIDX(p_pcb->handle);
+ p_cb->rfc_hdl[si] = 0;
+ p_pcb->state = BTA_JV_ST_NONE;
+ p_pcb->handle = 0;
+ RFCOMM_RemoveServer(port_handle);
evt_data.rfc_close.port_status = code;
p_cback(BTA_JV_RFCOMM_CLOSE_EVT, &evt_data, user_data);
}