mirror of
https://github.com/h2zero/esp-nimble-cpp.git
synced 2024-11-22 13:10:55 +01:00
Add service isStarted method, remove abort in NimBLEServer::start.
This commit is contained in:
parent
792359b510
commit
bd29e738bd
2 changed files with 4 additions and 2 deletions
|
@ -215,7 +215,9 @@ void NimBLEServer::start() {
|
||||||
if(svc->m_removed == 0) {
|
if(svc->m_removed == 0) {
|
||||||
rc = ble_gatts_find_svc(&svc->getUUID().getNative()->u, &svc->m_handle);
|
rc = ble_gatts_find_svc(&svc->getUUID().getNative()->u, &svc->m_handle);
|
||||||
if(rc != 0) {
|
if(rc != 0) {
|
||||||
abort();
|
NIMBLE_LOGW(LOG_TAG, "GATT Server started without service: %s, Service %s",
|
||||||
|
svc->getUUID().toString().c_str(), svc->isStarted() ? "missing" : "not started");
|
||||||
|
continue; // Skip this service as it was not started
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -44,7 +44,7 @@ public:
|
||||||
uint16_t getHandle();
|
uint16_t getHandle();
|
||||||
std::string toString();
|
std::string toString();
|
||||||
void dump();
|
void dump();
|
||||||
|
bool isStarted() { return m_pSvcDef != nullptr; }
|
||||||
bool start();
|
bool start();
|
||||||
|
|
||||||
NimBLECharacteristic* createCharacteristic(const char* uuid,
|
NimBLECharacteristic* createCharacteristic(const char* uuid,
|
||||||
|
|
Loading…
Reference in a new issue