projects
/
platform
/
core
/
connectivity
/
bluetooth-frwk.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Handle ACL Disconnect Reason
[platform/core/connectivity/bluetooth-frwk.git]
/
bt-oal
/
oal-device-mgr.c
diff --git
a/bt-oal/oal-device-mgr.c
b/bt-oal/oal-device-mgr.c
index
33ee984
..
1ddacc9
100755
(executable)
--- a/
bt-oal/oal-device-mgr.c
+++ b/
bt-oal/oal-device-mgr.c
@@
-692,6
+692,9
@@
void cb_device_acl_state_changed(bt_status_t status, bt_bdaddr_t *bd_addr,
memcpy(conn_status->address.addr, bd_addr->address, 6);
memcpy(conn_status->address.addr, bd_addr->address, 6);
+#ifdef TIZEN_BT_HAL
+ conn_status->status = convert_to_oal_status(status);
+#else
if (BT_STATUS_SUCCESS != status) {
/* At present only timeout will cause non-success status, later we can add more */
conn_status->status = OAL_STATUS_CONN_TIMEOUT;
if (BT_STATUS_SUCCESS != status) {
/* At present only timeout will cause non-success status, later we can add more */
conn_status->status = OAL_STATUS_CONN_TIMEOUT;
@@
-700,6
+703,10
@@
void cb_device_acl_state_changed(bt_status_t status, bt_bdaddr_t *bd_addr,
conn_status->status = OAL_STATUS_SUCCESS;
memcpy(conn_status->address.addr, bd_addr->address, 6);
conn_status->status = OAL_STATUS_SUCCESS;
memcpy(conn_status->address.addr, bd_addr->address, 6);
+#endif
+
+ BT_INFO("ACL STATE :%d, conn_status->status :%d, BT_ACL_STATE: %d", status, conn_status->status, state);
+
switch (state) {
case BT_ACL_STATE_CONNECTED:
event = OAL_EVENT_DEVICE_ACL_CONNECTED;
switch (state) {
case BT_ACL_STATE_CONNECTED:
event = OAL_EVENT_DEVICE_ACL_CONNECTED;
@@
-729,11
+736,7
@@
void cb_device_le_conn_state_changed(bt_status_t status, bt_bdaddr_t *bd_addr,
BT_DBG("LE conn status:%d, state: %d", status, state);
memcpy(conn_status->address.addr, bd_addr->address, 6);
BT_DBG("LE conn status:%d, state: %d", status, state);
memcpy(conn_status->address.addr, bd_addr->address, 6);
- if (BT_STATUS_SUCCESS != status)
- /* At present only timeout will cause non-success status, later we can add more */
- conn_status->status = OAL_STATUS_CONN_TIMEOUT;
- else
- conn_status->status = OAL_STATUS_SUCCESS;
+ conn_status->status = convert_to_oal_status(status);
switch (state) {
case BT_LE_CONN_STATE_CONNECTED:
switch (state) {
case BT_LE_CONN_STATE_CONNECTED: