Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 48d5edb1 authored by Subramanian Srinivasan's avatar Subramanian Srinivasan Committed by android-build-merger
Browse files

Use correct transport type for GATT client and server connections

am: 5b8dfe09

* commit '5b8dfe09':
  Use correct transport type for GATT client and server connections
parents a2cebaab 5b8dfe09
Loading
Loading
Loading
Loading
+21 −15
Original line number Diff line number Diff line
@@ -1189,6 +1189,11 @@ static void btgattc_handle_event(uint16_t event, char* p_param)
                BTA_DmBleSetBgConnType(BTM_BLE_CONN_AUTO, NULL);
            }

            // Determine transport
            if (p_cb->transport != GATT_TRANSPORT_AUTO)
            {
                transport = p_cb->transport;
            } else {
                switch(device_type)
                {
                    case BT_DEVICE_TYPE_BREDR:
@@ -1206,10 +1211,11 @@ static void btgattc_handle_event(uint16_t event, char* p_param)
                            transport = BTA_GATT_TRANSPORT_BR_EDR;
                        break;
                }
            }

            // Connect!
            BTIF_TRACE_DEBUG ("BTA_GATTC_Open Transport  = %d, dev type = %d",
                                transport, device_type);
            BTIF_TRACE_DEBUG ("%s Transport=%d, device type=%d",
                                __func__, transport, device_type);
            BTA_GATTC_Open(p_cb->client_if, p_cb->bd_addr.address, p_cb->is_direct, transport);
            break;
        }
+23 −17
Original line number Diff line number Diff line
@@ -395,6 +395,11 @@ static void btgatts_handle_event(uint16_t event, char* p_param)
            if (!p_cb->is_direct)
                BTA_DmBleSetBgConnType(BTM_BLE_CONN_AUTO, NULL);

            // Determine transport
            if (p_cb->transport != GATT_TRANSPORT_AUTO)
            {
                transport = p_cb->transport;
            } else {
                switch(device_type)
                {
                    case BT_DEVICE_TYPE_BREDR:
@@ -413,9 +418,10 @@ static void btgatts_handle_event(uint16_t event, char* p_param)
                        break;

                    default:
                    BTIF_TRACE_ERROR (" GATT Open :Invalid device type %d",device_type);
                        BTIF_TRACE_ERROR ("%s: Invalid device type %d", __func__, device_type);
                        return;
                }
            }

            // Connect!
            BTA_GATTS_Open(p_cb->server_if, p_cb->bd_addr.address,