mirror of
https://github.com/apache/nuttx.git
synced 2026-05-21 04:52:02 +08:00
net/tcp/udp: remove all domain assertion
fix build break if enable CONFIG_NET_IPv6 only
In file included from tcp/tcp_sendfile.c:38:
tcp/tcp_sendfile.c: In function ‘sendfile_eventhandler’:
tcp/tcp_sendfile.c:173:27: error: ‘struct tcp_conn_s’ has no member named ‘domain’
173 | DEBUGASSERT(conn->domain == PF_INET6);
| ^~
Signed-off-by: chao an <anchao@xiaomi.com>
This commit is contained in:
@@ -281,7 +281,6 @@ static inline void send_ipselect(FAR struct net_driver_s *dev,
|
||||
{
|
||||
/* Select the IPv6 domain */
|
||||
|
||||
DEBUGASSERT(conn->domain == PF_INET6);
|
||||
tcp_ipv6_select(dev);
|
||||
}
|
||||
}
|
||||
@@ -361,7 +360,6 @@ static uint16_t psock_send_eventhandler(FAR struct net_driver_s *dev,
|
||||
if (conn->domain == PF_INET)
|
||||
#endif
|
||||
{
|
||||
DEBUGASSERT(IFF_IS_IPv4(dev->d_flags));
|
||||
tcp = TCPIPv4BUF;
|
||||
}
|
||||
#endif /* CONFIG_NET_IPv4 */
|
||||
@@ -371,7 +369,6 @@ static uint16_t psock_send_eventhandler(FAR struct net_driver_s *dev,
|
||||
else
|
||||
#endif
|
||||
{
|
||||
DEBUGASSERT(IFF_IS_IPv6(dev->d_flags));
|
||||
tcp = TCPIPv6BUF;
|
||||
}
|
||||
#endif /* CONFIG_NET_IPv6 */
|
||||
|
||||
@@ -139,7 +139,6 @@ static inline void tcpsend_ipselect(FAR struct net_driver_s *dev,
|
||||
{
|
||||
/* Select the IPv6 domain */
|
||||
|
||||
DEBUGASSERT(conn->domain == PF_INET6);
|
||||
tcp_ipv6_select(dev);
|
||||
}
|
||||
}
|
||||
@@ -220,7 +219,6 @@ static uint16_t tcpsend_eventhandler(FAR struct net_driver_s *dev,
|
||||
if (conn->domain == PF_INET)
|
||||
#endif
|
||||
{
|
||||
DEBUGASSERT(IFF_IS_IPv4(dev->d_flags));
|
||||
tcp = TCPIPv4BUF;
|
||||
}
|
||||
#endif /* CONFIG_NET_IPv4 */
|
||||
@@ -230,7 +228,6 @@ static uint16_t tcpsend_eventhandler(FAR struct net_driver_s *dev,
|
||||
else
|
||||
#endif
|
||||
{
|
||||
DEBUGASSERT(IFF_IS_IPv6(dev->d_flags));
|
||||
tcp = TCPIPv6BUF;
|
||||
}
|
||||
#endif /* CONFIG_NET_IPv6 */
|
||||
|
||||
@@ -170,7 +170,6 @@ static uint16_t sendfile_eventhandler(FAR struct net_driver_s *dev,
|
||||
if (IFF_IS_IPv6(dev->d_flags))
|
||||
#endif
|
||||
{
|
||||
DEBUGASSERT(conn->domain == PF_INET6);
|
||||
tcp = TCPIPv6BUF;
|
||||
}
|
||||
#endif /* CONFIG_NET_IPv6 */
|
||||
@@ -180,9 +179,6 @@ static uint16_t sendfile_eventhandler(FAR struct net_driver_s *dev,
|
||||
else
|
||||
#endif
|
||||
{
|
||||
#if defined(CONFIG_NET_IPv4) && defined(CONFIG_NET_IPv6)
|
||||
DEBUGASSERT(conn->domain == PF_INET);
|
||||
#endif
|
||||
tcp = TCPIPv4BUF;
|
||||
}
|
||||
#endif /* CONFIG_NET_IPv4 */
|
||||
|
||||
@@ -208,7 +208,6 @@ static inline void sendto_ipselect(FAR struct net_driver_s *dev,
|
||||
{
|
||||
/* Select the IPv6 domain */
|
||||
|
||||
DEBUGASSERT(conn->domain == PF_INET6);
|
||||
udp_ipv6_select(dev);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -117,7 +117,6 @@ static inline void sendto_ipselect(FAR struct net_driver_s *dev,
|
||||
{
|
||||
/* Select the IPv6 domain */
|
||||
|
||||
DEBUGASSERT(conn->domain == PF_INET6);
|
||||
udp_ipv6_select(dev);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user