Skip to content

Commit d020683

Browse files
committed
Fixup server logs
1 parent 1e7b5c7 commit d020683

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

src/NimBLEServer.cpp

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -351,7 +351,6 @@ int NimBLEServer::handleGapEvent(ble_gap_event* event, void* arg) {
351351
switch (event->type) {
352352
case BLE_GAP_EVENT_CONNECT: {
353353
if (event->connect.status != 0) {
354-
/* Connection failed; resume advertising */
355354
NIMBLE_LOGE(LOG_TAG, "Connection failed");
356355
# if !CONFIG_BT_NIMBLE_EXT_ADV
357356
NimBLEDevice::startAdvertising();
@@ -420,7 +419,7 @@ int NimBLEServer::handleGapEvent(ble_gap_event* event, void* arg) {
420419
NIMBLE_LOGI(LOG_TAG,
421420
"subscribe event; attr_handle=%d, subscribed: %s",
422421
event->subscribe.attr_handle,
423-
(event->subscribe.cur_notify ? "true" : "false"));
422+
((event->subscribe.cur_notify || event->subscribe.cur_indicate) ? "true" : "false"));
424423

425424
for (const auto& svc : pServer->m_svcVec) {
426425
for (const auto& chr : svc->m_vChars) {
@@ -594,7 +593,7 @@ int NimBLEServer::handleGapEvent(ble_gap_event* event, void* arg) {
594593
break;
595594
}
596595

597-
NIMBLE_LOGD(LOG_TAG, "<< handleGATTServerEvent");
596+
NIMBLE_LOGD(LOG_TAG, "<< handleGapEvent");
598597
return 0;
599598
} // handleGapEvent
600599

@@ -751,7 +750,7 @@ void NimBLEServer::addService(NimBLEService* service) {
751750

752751
service->setRemoved(0);
753752
serviceChanged();
754-
}
753+
} // addService
755754

756755
/**
757756
* @brief Resets the GATT server, used when services are added/removed after initialization.

0 commit comments

Comments
 (0)