Merge pull request #12352 from haukepetersen/opt_nimble_netifconndebug

pkg/nimble/netif_conn: improve debug messages
This commit is contained in:
Martine Lenders 2019-10-07 14:00:16 +02:00 committed by GitHub
commit 8ff09158b0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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) {