This is an automated email from the ASF dual-hosted git repository.

sjanc pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mynewt-nimble.git

commit 4885b73f5ddeeacb7f7c4e438c606baf6d1bb653
Author: Szymon Janc <[email protected]>
AuthorDate: Fri Oct 9 01:12:12 2026 +0200

    nimble/host: Fix EATT log messages
    
    Some EATT log messages were missing trailing newline, which resulted in
    messages being concatenated in log output, and the channel release
    warning was missing conversion specifier for operation. Also use
    __func__ instead of hardcoded function names.
    
    Assisted-by: Claude:claude-opus-5-5
---
 nimble/host/src/ble_eatt.c | 15 ++++++++-------
 1 file changed, 8 insertions(+), 7 deletions(-)

diff --git a/nimble/host/src/ble_eatt.c b/nimble/host/src/ble_eatt.c
index 6bff6a6ee..19837b013 100644
--- a/nimble/host/src/ble_eatt.c
+++ b/nimble/host/src/ble_eatt.c
@@ -481,8 +481,9 @@ ble_eatt_release_chan(uint16_t conn_handle, uint8_t op)
 
     eatt = ble_eatt_find_by_conn_handle_and_busy_op(conn_handle, op);
     if (!eatt) {
-        BLE_EATT_LOG_WARN("ble_eatt_release_chan:"
-                          "EATT not found for conn_handle 0x%04x, operation 
0x%02\n", conn_handle, op);
+        BLE_EATT_LOG_WARN("%s: EATT not found for conn_handle 0x%04x, "
+                          "operation 0x%02x\n",
+                          __func__, conn_handle, op);
         return;
     }
 
@@ -495,10 +496,10 @@ ble_eatt_tx(uint16_t conn_handle, uint16_t cid, struct 
os_mbuf *txom)
     struct ble_eatt *eatt;
     int rc;
 
-    BLE_EATT_LOG_DEBUG("eatt: %s, size %d ", __func__, OS_MBUF_PKTLEN(txom));
+    BLE_EATT_LOG_DEBUG("eatt: %s, size %d\n", __func__, OS_MBUF_PKTLEN(txom));
     eatt = ble_eatt_find(conn_handle, cid);
     if (!eatt || !eatt->chan) {
-        BLE_EATT_LOG_ERROR("Eatt not available");
+        BLE_EATT_LOG_ERROR("Eatt not available\n");
         rc = BLE_HS_ENOENT;
         goto error;
     }
@@ -509,9 +510,9 @@ ble_eatt_tx(uint16_t conn_handle, uint16_t cid, struct 
os_mbuf *txom)
     }
 
     if (rc == BLE_HS_ESTALLED) {
-        BLE_EATT_LOG_DEBUG("ble_eatt_tx: Eatt stalled");
+        BLE_EATT_LOG_DEBUG("%s: Eatt stalled\n", __func__);
     } else if (rc == BLE_HS_EBUSY) {
-        BLE_EATT_LOG_DEBUG("ble_eatt_tx: Message queued");
+        BLE_EATT_LOG_DEBUG("%s: Message queued\n", __func__);
         /* Channel is stalled waiting for credits, queued PDU will be sent
          * on BLE_L2CAP_EVENT_COC_TX_UNSTALLED event.
          */
@@ -522,7 +523,7 @@ ble_eatt_tx(uint16_t conn_handle, uint16_t cid, struct 
os_mbuf *txom)
         goto error;
     } else {
         /* Transmission failed, txom was consumed */
-        BLE_EATT_LOG_ERROR("eatt: %s, ERROR %d ", __func__, rc);
+        BLE_EATT_LOG_ERROR("eatt: %s, ERROR %d\n", __func__, rc);
         return rc;
     }
 done:

Reply via email to