Skip to content

Commit 280e919

Browse files
committed
Fix compile error for advertiser only config.
1 parent 85e500d commit 280e919

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/NimBLEDevice.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1154,6 +1154,7 @@ bool NimBLEDevice::startSecurity(uint16_t connHandle, int* rcPtr) {
11541154
return rc == 0 || rc == BLE_HS_EALREADY;
11551155
} // startSecurity
11561156

1157+
# if defined(CONFIG_BT_NIMBLE_ROLE_CENTRAL) || defined(CONFIG_BT_NIMBLE_ROLE_PERIPHERAL)
11571158
/**
11581159
* @brief Inject the provided passkey into the Security Manager.
11591160
* @param [in] peerInfo Connection information for the peer.
@@ -1178,6 +1179,7 @@ bool NimBLEDevice::injectConfirmPasskey(const NimBLEConnInfo& peerInfo, bool acc
11781179
NIMBLE_LOGD(LOG_TAG, "BLE_SM_IOACT_NUMCMP; ble_sm_inject_io result: %d", rc);
11791180
return rc == 0;
11801181
}
1182+
# endif // CONFIG_BT_NIMBLE_ROLE_CENTRAL || CONFIG_BT_NIMBLE_ROLE_PERIPHERAL
11811183

11821184
/* -------------------------------------------------------------------------- */
11831185
/* UTILITIES */

0 commit comments

Comments
 (0)