Skip to content

Commit 89a3b45

Browse files
committed
[Bugfix] Compile errors when building without connectable roles enabled
1 parent 23a8a6d commit 89a3b45

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/nimble/nimble/host/src/ble_gap.c

+8
Original file line numberDiff line numberDiff line change
@@ -606,6 +606,8 @@ ble_gap_read_rem_ver_info(uint16_t conn_handle, uint8_t *version, uint16_t *manu
606606
*subversion = conn->bhc_rd_rem_ver_params.subversion;
607607

608608
return 0;
609+
#else
610+
return BLE_HS_ENOTSUP;
609611
#endif
610612
}
611613

@@ -2783,6 +2785,7 @@ ble_gap_rx_conn_complete(struct ble_gap_conn_complete *evt, uint8_t instance)
27832785
void
27842786
ble_gap_event_connect_call(uint16_t conn_handle, int status)
27852787
{
2788+
#if NIMBLE_BLE_CONNECT
27862789
struct ble_gap_event event;
27872790
uint16_t handle = le16toh(conn_handle);
27882791

@@ -2814,6 +2817,7 @@ ble_gap_event_connect_call(uint16_t conn_handle, int status)
28142817

28152818
ble_hs_hci_util_set_data_len(le16toh(conn_handle), BLE_HCI_SUGG_DEF_DATALEN_TX_OCTETS_MAX,
28162819
BLE_HCI_SUGG_DEF_DATALEN_TX_TIME_MAX);
2820+
#endif
28172821
}
28182822

28192823
void
@@ -8016,6 +8020,7 @@ int
80168020
ble_gap_set_data_len(uint16_t conn_handle, uint16_t tx_octets,
80178021
uint16_t tx_time)
80188022
{
8023+
#if NIMBLE_BLE_CONNECT
80198024
/* Check if host has triggered Set data len for same parameters
80208025
* which are currently set in controller.
80218026
* If yes, then just return event to host indicating success
@@ -8040,6 +8045,9 @@ ble_gap_set_data_len(uint16_t conn_handle, uint16_t tx_octets,
80408045
}
80418046

80428047
return ble_hs_hci_util_set_data_len(conn_handle, tx_octets, tx_time);
8048+
#else
8049+
return BLE_HS_ENOTSUP;
8050+
#endif
80438051
}
80448052

80458053
int

0 commit comments

Comments
 (0)