mirror of
https://github.com/espressif/esp-idf.git
synced 2026-06-04 20:26:38 +03:00
Merge branch 'bugfix/fix_read_failed_if_smp_is_disabled' into 'master'
fix(ble/bluedroid): Fixed read or write failed if SMP is disabled Closes WIFIBUG-1746 See merge request espressif/esp-idf!46128
This commit is contained in:
@@ -1050,13 +1050,11 @@ tGATT_STATUS GATTC_Read (UINT16 conn_id, tGATT_READ_TYPE type, tGATT_READ_PARAM
|
||||
default:
|
||||
break;
|
||||
}
|
||||
#if (SMP_INCLUDED == TRUE)
|
||||
/* start security check */
|
||||
if (gatt_security_check_start(p_clcb) == FALSE) {
|
||||
status = GATT_NO_RESOURCES;
|
||||
gatt_clcb_dealloc(p_clcb);
|
||||
}
|
||||
#endif // (SMP_INCLUDED == TRUE)
|
||||
} else {
|
||||
status = GATT_NO_RESOURCES;
|
||||
}
|
||||
@@ -1116,11 +1114,9 @@ tGATT_STATUS GATTC_Write (UINT16 conn_id, tGATT_WRITE_TYPE type, tGATT_VALUE *p_
|
||||
p_clcb->start_offset = p_write->offset;
|
||||
p->offset = 0;
|
||||
}
|
||||
#if (SMP_INCLUDED == TRUE)
|
||||
if (gatt_security_check_start(p_clcb) == FALSE) {
|
||||
status = GATT_NO_RESOURCES;
|
||||
}
|
||||
#endif // (SMP_INCLUDED == TRUE)
|
||||
} else {
|
||||
status = GATT_NO_RESOURCES;
|
||||
}
|
||||
|
||||
@@ -131,8 +131,6 @@ void gatt_verify_signature(tGATT_TCB *p_tcb, BT_HDR *p_buf)
|
||||
}
|
||||
#endif ///SMP_INCLUDED == TRUE
|
||||
|
||||
#if (SMP_INCLUDED == TRUE)
|
||||
|
||||
/*******************************************************************************
|
||||
**
|
||||
** Function gatt_sec_check_complete
|
||||
@@ -160,6 +158,7 @@ void gatt_sec_check_complete(BOOLEAN sec_check_ok, tGATT_CLCB *p_clcb, UINT8 s
|
||||
}
|
||||
}
|
||||
|
||||
#if (SMP_INCLUDED == TRUE)
|
||||
/*******************************************************************************
|
||||
**
|
||||
** Function gatt_enc_cmpl_cback
|
||||
@@ -258,7 +257,7 @@ void gatt_notify_enc_cmpl(BD_ADDR bd_addr)
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
#endif // (SMP_INCLUDED == TRUE)
|
||||
/*******************************************************************************
|
||||
**
|
||||
** Function gatt_set_sec_act
|
||||
@@ -292,7 +291,7 @@ tGATT_SEC_ACTION gatt_get_sec_act(tGATT_TCB *p_tcb)
|
||||
}
|
||||
return sec_act;
|
||||
}
|
||||
#endif // (SMP_INCLUDED == TRUE)
|
||||
|
||||
/*******************************************************************************
|
||||
**
|
||||
** Function gatt_determine_sec_act
|
||||
@@ -428,7 +427,6 @@ tGATT_STATUS gatt_get_link_encrypt_status(tGATT_TCB *p_tcb)
|
||||
return encrypt_status ;
|
||||
}
|
||||
|
||||
#if (SMP_INCLUDED == TRUE)
|
||||
/*******************************************************************************
|
||||
**
|
||||
** Function gatt_convert_sec_action
|
||||
@@ -526,6 +524,5 @@ BOOLEAN gatt_security_check_start(tGATT_CLCB *p_clcb)
|
||||
|
||||
return status;
|
||||
}
|
||||
#endif // (SMP_INCLUDED == TRUE)
|
||||
|
||||
#endif /* BLE_INCLUDED */
|
||||
|
||||
@@ -2799,7 +2799,6 @@ BOOLEAN gatt_update_auto_connect_dev (tGATT_IF gatt_if, BOOLEAN add, BD_ADDR bd_
|
||||
}
|
||||
#endif // #if (GATT_BG_CONN_DEV == TRUE)
|
||||
|
||||
#if (SMP_INCLUDED == TRUE)
|
||||
/*******************************************************************************
|
||||
**
|
||||
** Function gatt_add_pending_new_srv_start
|
||||
@@ -2821,7 +2820,6 @@ tGATT_PENDING_ENC_CLCB *gatt_add_pending_enc_channel_clcb(tGATT_TCB *p_tcb, tGAT
|
||||
}
|
||||
return p_buf;
|
||||
}
|
||||
#endif // (SMP_INCLUDED == TRUE)
|
||||
|
||||
char *gatt_uuid_to_str(const tBT_UUID *uuid)
|
||||
{
|
||||
|
||||
@@ -376,10 +376,8 @@ typedef struct{
|
||||
}tGATT_PREPARE_WRITE_RECORD;
|
||||
|
||||
typedef struct {
|
||||
#if (SMP_INCLUDED == TRUE)
|
||||
fixed_queue_t *pending_enc_clcb; /* pending encryption channel q */
|
||||
tGATT_SEC_ACTION sec_act;
|
||||
#endif // (SMP_INCLUDED == TRUE)
|
||||
|
||||
BD_ADDR peer_bda;
|
||||
tBT_TRANSPORT transport;
|
||||
|
||||
Reference in New Issue
Block a user