From 124212624d420efbdd2eb986a268684a9b97fcb6 Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Sun, 28 Jul 2019 07:39:55 -0600 Subject: [PATCH] net: Minor fix in error checking in TCP/UDP Tx drain logic --- net/tcp/tcp_conn.c | 2 +- net/tcp/tcp_txdrain.c | 4 ++-- net/udp/udp_txdrain.c | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/net/tcp/tcp_conn.c b/net/tcp/tcp_conn.c index e935957ce6..1b0be8e829 100644 --- a/net/tcp/tcp_conn.c +++ b/net/tcp/tcp_conn.c @@ -747,7 +747,7 @@ void tcp_free(FAR struct tcp_conn_s *conn) #endif /* Because g_free_tcp_connections is accessed from user level and event - * processing logic, it is necessary to keep the newtork locked during this + * processing logic, it is necessary to keep the network locked during this * operation. */ diff --git a/net/tcp/tcp_txdrain.c b/net/tcp/tcp_txdrain.c index 96d9171e40..781f3707e6 100644 --- a/net/tcp/tcp_txdrain.c +++ b/net/tcp/tcp_txdrain.c @@ -65,7 +65,7 @@ * Called with the write buffers have all been sent. * * Input Parameters: - * arg - The semaphore that will wake up tcp_txdrain + * arg - The notifier entry. * * Returned Value: * None. @@ -178,7 +178,7 @@ int tcp_txdrain(FAR struct socket *psock, { ret = net_timedwait(&waitsem, abstime); } - while (ret == EINTR); + while (ret == -EINTR); /* Tear down the disconnect notifier */ diff --git a/net/udp/udp_txdrain.c b/net/udp/udp_txdrain.c index ef20506e17..ffbc0ba2d1 100644 --- a/net/udp/udp_txdrain.c +++ b/net/udp/udp_txdrain.c @@ -144,7 +144,7 @@ int udp_txdrain(FAR struct socket *psock, { ret = net_timedwait(&waitsem, abstime); } - while (ret == EINTR); + while (ret == -EINTR); /* Tear down the notifier (in case we timed out or were canceled) */