OSDN Git Service

am 156c52bb: Send correct status for SMP AUTH failure
authorPriti Aghera <paghera@broadcom.com>
Fri, 11 Jul 2014 01:40:17 +0000 (01:40 +0000)
committerAndroid Git Automerger <android-git-automerger@android.com>
Fri, 11 Jul 2014 01:40:17 +0000 (01:40 +0000)
* commit '156c52bb003a14147db99d8a151edc08f591bd34':
  Send correct status for SMP AUTH failure

1  2 
btif/src/btif_dm.c

diff --combined btif/src/btif_dm.c
@@@ -159,7 -159,6 +159,7 @@@ extern bt_status_t btif_hf_execute_serv
  extern bt_status_t btif_av_execute_service(BOOLEAN b_enable);
  extern bt_status_t btif_hh_execute_service(BOOLEAN b_enable);
  extern bt_status_t btif_hf_client_execute_service(BOOLEAN b_enable);
 +extern bt_status_t btif_mce_execute_service(BOOLEAN b_enable);
  extern int btif_hh_connect(bt_bdaddr_t *bd_addr);
  extern void bta_gatt_convert_uuid16_to_uuid128(UINT8 uuid_128[LEN_UUID_128], UINT16 uuid_16);
  
@@@ -191,10 -190,6 +191,10 @@@ bt_status_t btif_in_execute_service_req
           {
               btif_hf_client_execute_service(b_enable);
           }break;
 +         case BTA_MAP_SERVICE_ID:
 +         {
 +             btif_mce_execute_service(b_enable);
 +         }break;
           default:
                BTIF_TRACE_ERROR("%s: Unknown service being enabled", __FUNCTION__);
                return BT_STATUS_FAIL;
@@@ -2518,6 -2513,14 +2518,14 @@@ static void btif_dm_ble_auth_cmpl_evt (
          /*Map the HCI fail reason  to  bt status  */
          switch (p_auth_cmpl->fail_reason)
          {
+             case BTA_DM_AUTH_SMP_PAIR_AUTH_FAIL:
+             case BTA_DM_AUTH_SMP_CONFIRM_VALUE_FAIL:
+                 btif_dm_remove_ble_bonding_keys();
+                 status = BT_STATUS_AUTH_FAILURE;
+                 break;
+             case BTA_DM_AUTH_SMP_PAIR_NOT_SUPPORT:
+                 status = BT_STATUS_AUTH_REJECTED;
+                 break;
              default:
                  btif_dm_remove_ble_bonding_keys();
                  status =  BT_STATUS_FAIL;