Skip to content

Does not compile when BT_NIMBLE_ROLE_CENTRAL is disabled #340

@dorianim

Description

@dorianim

I just upgraded from v1 to v2 and noticed a minor issue:
When the option "Enable BLE Central role" (BT_NIMBLE_ROLE_CENTRAL) is disabled, there is a compile error:

.../components/esp-nimble-cpp/src/NimBLEL2CAPChannel.cpp: In member function 'int NimBLEL2CAPChannel::writeFragment(std::vector<unsigned char>::const_iterator, std::vector<unsigned char>::const_iterator)':
.../components/esp-nimble-cpp/src/NimBLEL2CAPChannel.cpp:97:17: error: 'BLE_HS_EBADDATA' was not declared in this scope
   97 |         return -BLE_HS_EBADDATA;
      |                 ^~~~~~~~~~~~~~~
.../components/esp-nimble-cpp/src/NimBLEL2CAPChannel.cpp:106:21: error: 'BLE_HS_ENOMEM' was not declared in this scope; did you mean 'BLE_NPL_ENOMEM'?
  106 |             return -BLE_HS_ENOMEM;
      |                     ^~~~~~~~~~~~~
      |                     BLE_NPL_ENOMEM
.../components/esp-nimble-cpp/src/NimBLEL2CAPChannel.cpp:120:18: error: 'BLE_HS_ESTALLED' was not declared in this scope
  120 |             case BLE_HS_ESTALLED:
      |                  ^~~~~~~~~~~~~~~
.../components/esp-nimble-cpp/src/NimBLEL2CAPChannel.cpp:127:18: error: 'BLE_HS_ENOMEM' was not declared in this scope; did you mean 'BLE_NPL_ENOMEM'?
  127 |             case BLE_HS_ENOMEM:
      |                  ^~~~~~~~~~~~~
      |                  BLE_NPL_ENOMEM
.../components/esp-nimble-cpp/src/NimBLEL2CAPChannel.cpp:128:18: error: 'BLE_HS_EAGAIN' was not declared in this scope
  128 |             case BLE_HS_EAGAIN:
      |                  ^~~~~~~~~~~~~
.../components/esp-nimble-cpp/src/NimBLEL2CAPChannel.cpp:129:18: error: 'BLE_HS_EBUSY' was not declared in this scope; did you mean 'BLE_NPL_EBUSY'?
  129 |             case BLE_HS_EBUSY:
      |                  ^~~~~~~~~~~~
      |                  BLE_NPL_EBUSY
.../components/esp-nimble-cpp/src/NimBLEL2CAPChannel.cpp:141:13: error: 'BLE_HS_EREJECT' was not declared in this scope
  141 |     return -BLE_HS_EREJECT;
      |             ^~~~~~~~~~~~~~

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions