mirror of
https://github.com/esphome/esphome.git
synced 2026-10-04 18:11:29 +00:00
Require the proxy in the wrapper's compile gate
The hub wrapper serves the proxy's API surface, but its gate keyed on the backend define alone while the backend guarded its own proxy pieces on USE_BLUETOOTH_PROXY. Narrow BLUETOOTH_CONNECTION_HAS_GATT to require both so a future backend-only consumer build agrees with the backend's guards. No change to any build this PR can produce (only the proxy emits USE_BLE_GATT_CLIENT here).
This commit is contained in:
@@ -19,10 +19,12 @@
|
||||
// The connection-aware API request handlers are compiled: a GATT backend is
|
||||
// wired by codegen (one slot per connection). This is the single spelling of
|
||||
// that predicate - the hub wrapper and the API request handlers gate on it.
|
||||
// Advertisement-only builds get the clean-error handlers; address-scoped
|
||||
// maintenance (unpair, cache clear) still works there through the
|
||||
// per-platform free functions below.
|
||||
#ifdef USE_BLE_GATT_CLIENT
|
||||
// The wrapper serves the proxy's API surface, so it compiles only when a
|
||||
// backend AND the proxy are present; advertisement-only and backend-only
|
||||
// builds get the clean-error handlers instead. Address-scoped maintenance
|
||||
// (unpair, cache clear) still works there through the per-platform free
|
||||
// functions below.
|
||||
#if defined(USE_BLE_GATT_CLIENT) && defined(USE_BLUETOOTH_PROXY)
|
||||
#define BLUETOOTH_CONNECTION_HAS_GATT
|
||||
#endif
|
||||
|
||||
|
||||
Reference in New Issue
Block a user