Networking: Fix some problems with debug is enabled; fix a warning

This commit is contained in:
Gregory Nutt 2015-01-19 10:16:37 -06:00
parent 8cf9150b15
commit 2842b5c5d6
2 changed files with 6 additions and 4 deletions

View File

@ -250,6 +250,8 @@ static inline void tcp_ipv6_sendcomplete(FAR struct net_driver_s *dev,
static void tcp_sendcomplete(FAR struct net_driver_s *dev,
FAR struct tcp_hdr_s *tcp)
{
nllvdbg("TCP payload: %d (%d) bytes\n", dev->d_sndlen, dev->d_len);
#ifdef CONFIG_NET_IPv6
#ifdef CONFIG_NET_IPv4
if (IFF_IS_IPv6(dev->d_flags))
@ -268,8 +270,7 @@ static void tcp_sendcomplete(FAR struct net_driver_s *dev,
}
#endif /* CONFIG_NET_IPv4 */
nllvdbg("Outgoing TCP packet length: %d (%d)\n",
dev->d_len, (tcp->len[0] << 8) | tcp->len[1]);
nllvdbg("Outgoing TCP packet length: %d bytes\n", dev->d_len);
#ifdef CONFIG_NET_STATISTICS
g_netstats.tcp.sent++;

View File

@ -107,6 +107,8 @@ void udp_send(FAR struct net_driver_s *dev, FAR struct udp_conn_s *conn)
{
FAR struct udp_hdr_s *udp;
nllvdbg("IP payload: %d bytes\n", dev->d_len);
if (dev->d_sndlen > 0)
{
/* Initialize the IP header. */
@ -209,8 +211,7 @@ void udp_send(FAR struct net_driver_s *dev, FAR struct udp_conn_s *conn)
udp->udpchksum = 0;
#endif
nllvdbg("Outgoing UDP packet length: %d (%d)\n",
dev->d_len, (udp->len[0] << 8) | udp->len[1]);
nllvdbg("Outgoing UDP packet length: %d\n", dev->d_len);
#ifdef CONFIG_NET_STATISTICS
g_netstats.udp.sent++;