pkg/nimble/netif_conn: improve debug messages

This commit is contained in:
Hauke Petersen 2019-09-30 20:51:50 +02:00
parent a7cb0a4b77
commit f8112e2164

View File

@ -81,7 +81,7 @@ int nimble_netif_conn_get_by_addr(const uint8_t *addr)
assert(addr);
int handle = NIMBLE_NETIF_CONN_INVALID;
DEBUG("nimble_netif_conn_get_by_addr %02x\n", (int)addr[5]);
DEBUG("nimble_netif_conn_get_by_addr %02x\n", (int)addr[0]);
mutex_lock(&_lock);
for (unsigned i = 0; i < CONN_CNT; i++) {
if ((_conn[i].state & NIMBLE_NETIF_L2CAP_CONNECTED) &&
@ -91,7 +91,7 @@ int nimble_netif_conn_get_by_addr(const uint8_t *addr)
}
}
mutex_unlock(&_lock);
DEBUG("nimble_netif_conn_get_by_addr - found: %i\n", handle);
DEBUG("nimble_netif_conn_get_by_addr - found handle: %i\n", handle);
return handle;
}
@ -118,7 +118,7 @@ int nimble_netif_conn_start_connection(const uint8_t *addr)
{
int handle;
DEBUG("nimble_netif_conn_start_connection, addr %02x\n", (int)addr[5]);
DEBUG("nimble_netif_conn_start_connection, addr %02x\n", (int)addr[0]);
mutex_lock(&_lock);
handle = _find_by_state(NIMBLE_NETIF_UNUSED);
if (handle != NIMBLE_NETIF_CONN_INVALID) {