pkg/nimble/netif_conn: improve debug messages
This commit is contained in:
parent
a7cb0a4b77
commit
f8112e2164
@ -81,7 +81,7 @@ int nimble_netif_conn_get_by_addr(const uint8_t *addr)
|
|||||||
assert(addr);
|
assert(addr);
|
||||||
int handle = NIMBLE_NETIF_CONN_INVALID;
|
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);
|
mutex_lock(&_lock);
|
||||||
for (unsigned i = 0; i < CONN_CNT; i++) {
|
for (unsigned i = 0; i < CONN_CNT; i++) {
|
||||||
if ((_conn[i].state & NIMBLE_NETIF_L2CAP_CONNECTED) &&
|
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);
|
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;
|
return handle;
|
||||||
}
|
}
|
||||||
@ -118,7 +118,7 @@ int nimble_netif_conn_start_connection(const uint8_t *addr)
|
|||||||
{
|
{
|
||||||
int handle;
|
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);
|
mutex_lock(&_lock);
|
||||||
handle = _find_by_state(NIMBLE_NETIF_UNUSED);
|
handle = _find_by_state(NIMBLE_NETIF_UNUSED);
|
||||||
if (handle != NIMBLE_NETIF_CONN_INVALID) {
|
if (handle != NIMBLE_NETIF_CONN_INVALID) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user