net: context: For bind debug logging, include context protocol.
It's not enough to know just network address and port number to disambiguate an endpoint, protocol (TCP vs UDP, etc.) should be known too. Without this patch, there is a confusing output from e.g. echo_server if both TCP and UDP is enabled. Jira: ZEP-1086 Change-Id: I247a2dfc87df634ceac3b8733d7349b1d6aca80c Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
This commit is contained in:
parent
80c2946c42
commit
c1ecd8c890
1 changed files with 6 additions and 2 deletions
|
@ -524,7 +524,9 @@ int net_context_bind(struct net_context *context, const struct sockaddr *addr,
|
|||
}
|
||||
}
|
||||
|
||||
NET_DBG("Context %p binding to [%s]:%d iface %p", context,
|
||||
NET_DBG("Context %p binding to %s [%s]:%d iface %p",
|
||||
context,
|
||||
net_proto2str(net_context_get_ip_proto(context)),
|
||||
net_sprint_ipv6_addr(ptr), ntohs(addr6->sin6_port),
|
||||
iface);
|
||||
|
||||
|
@ -593,7 +595,9 @@ int net_context_bind(struct net_context *context, const struct sockaddr *addr,
|
|||
}
|
||||
}
|
||||
|
||||
NET_DBG("Context %p binding to %s:%d iface %p", context,
|
||||
NET_DBG("Context %p binding to %s %s:%d iface %p",
|
||||
context,
|
||||
net_proto2str(net_context_get_ip_proto(context)),
|
||||
net_sprint_ipv4_addr(ptr),
|
||||
ntohs(addr4->sin_port), iface);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue