component/bt: fix the build error when using classic BT, with GATTC, GATTS and SMP disabled

This commit is contained in:
wangmengyang
2017-06-02 20:43:03 +08:00
parent e45a288516
commit ca4506fba9
6 changed files with 40 additions and 21 deletions
+2 -2
View File
@@ -280,7 +280,7 @@ BOOLEAN BTM_SecRegisterLinkKeyNotificationCallback (tBTM_LINK_KEY_CALLBACK *p_ca
** Returns TRUE if registered OK, else FALSE
**
*******************************************************************************/
#if (SMP_INCLUDED == TRUE)
#if (SMP_INCLUDED == TRUE) || (CLASSIC_BT_INCLUDED == TRUE)
BOOLEAN BTM_SecAddRmtNameNotifyCallback (tBTM_RMT_NAME_CALLBACK *p_callback)
{
int i;
@@ -306,7 +306,7 @@ BOOLEAN BTM_SecAddRmtNameNotifyCallback (tBTM_RMT_NAME_CALLBACK *p_callback)
** Returns TRUE if OK, else FALSE
**
*******************************************************************************/
#if (SMP_INCLUDED == TRUE)
#if (SMP_INCLUDED == TRUE) || (CLASSIC_BT_INCLUDED == TRUE)
BOOLEAN BTM_SecDeleteRmtNameNotifyCallback (tBTM_RMT_NAME_CALLBACK *p_callback)
{
int i;
@@ -909,11 +909,15 @@ void gatt_data_process (tGATT_TCB *p_tcb, BT_HDR *p_buf)
{
UINT8 *p = (UINT8 *)(p_buf + 1) + p_buf->offset;
UINT8 op_code, pseudo_op_code;
#if (GATTS_INCLUDED == TRUE) || (GATTC_INCLUDED == TRUE)
UINT16 msg_len;
#endif ///(GATTS_INCLUDED == TRUE) || (GATTC_INCLUDED == TRUE)
if (p_buf->len > 0) {
#if (GATTS_INCLUDED == TRUE) || (GATTC_INCLUDED == TRUE)
msg_len = p_buf->len - 1;
#endif ///(GATTS_INCLUDED == TRUE) || (GATTC_INCLUDED == TRUE)
STREAM_TO_UINT8(op_code, p);
/* remove the two MSBs associated with sign write and write cmd */
@@ -847,8 +847,10 @@ typedef struct {
TIMER_LIST_ENT pairing_tle; /* Timer for pairing process */
UINT16 disc_handle; /* for legacy devices */
UINT8 disc_reason; /* for legacy devices */
tBTM_SEC_SERV_REC sec_serv_rec[BTM_SEC_MAX_SERVICE_RECORDS];
#endif ///SMP_INCLUDED == TRUE
#if SMP_INCLUDED == TRUE || CLASSIC_BT_INCLUDED == TRUE
tBTM_SEC_SERV_REC sec_serv_rec[BTM_SEC_MAX_SERVICE_RECORDS];
#endif // SMP_INCLUDED == TRUE || CLASSIC_BT_ENABLED == TRUE
tBTM_SEC_DEV_REC sec_dev_rec[BTM_SEC_MAX_DEVICE_RECORDS];
tBTM_SEC_SERV_REC *p_out_serv;
tBTM_MKEY_CALLBACK *mkey_cback;