diff options
author | Sharvil Nanavati <sharvil@google.com> | 2014-10-14 18:46:32 -0700 |
---|---|---|
committer | Andre Eisenbach <eisenbach@google.com> | 2015-03-16 16:51:39 -0700 |
commit | 9f995d261c8ff0d281f5c25b283e0800bb2d59dd (patch) | |
tree | b694dac2b925477604f0b2747c686cf5c140f9d8 /stack/l2cap/l2c_api.c | |
parent | 79ecab5d0418fde77e9afcdd451bd713af73e180 (diff) | |
download | android_system_bt-9f995d261c8ff0d281f5c25b283e0800bb2d59dd.tar.gz android_system_bt-9f995d261c8ff0d281f5c25b283e0800bb2d59dd.tar.bz2 android_system_bt-9f995d261c8ff0d281f5c25b283e0800bb2d59dd.zip |
L2CAP: expose a function to return the RCID and ACL handle for a given LCID.
Diffstat (limited to 'stack/l2cap/l2c_api.c')
-rw-r--r-- | stack/l2cap/l2c_api.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/stack/l2cap/l2c_api.c b/stack/l2cap/l2c_api.c index 36f42f56c..7b6da3321 100644 --- a/stack/l2cap/l2c_api.c +++ b/stack/l2cap/l2c_api.c @@ -710,6 +710,19 @@ BOOLEAN L2CA_Echo (BD_ADDR p_bd_addr, BT_HDR *p_data, tL2CA_ECHO_DATA_CB *p_cal } +bool L2CA_GetIdentifiers(uint16_t lcid, uint16_t *rcid, uint16_t *handle) { + tL2C_CCB *control_block = l2cu_find_ccb_by_cid(NULL, lcid); + if (!control_block) + return false; + + if (rcid) + *rcid = control_block->remote_cid; + if (handle) + *handle = control_block->p_lcb->handle; + + return true; +} + /******************************************************************************* ** ** Function L2CA_SetIdleTimeout |