You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by ac...@apache.org on 2020/01/11 18:23:21 UTC

[incubator-nuttx] 02/03: net/tcp/tcp_send_unbuffered.c: Fix conditional test in same logic with the typo.

This is an automated email from the ASF dual-hosted git repository.

acassis pushed a commit to branch pr82
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git

commit 0d2f8d07d44a1321888a3cb8dcd7e47db7b3aa2c
Author: Gregory Nutt <gn...@nuttx.org>
AuthorDate: Sat Jan 11 12:06:41 2020 -0600

    net/tcp/tcp_send_unbuffered.c:  Fix conditional test in same logic with the typo.
---
 net/tcp/tcp_send_unbuffered.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/tcp/tcp_send_unbuffered.c b/net/tcp/tcp_send_unbuffered.c
index 1ff0406..46776b3 100644
--- a/net/tcp/tcp_send_unbuffered.c
+++ b/net/tcp/tcp_send_unbuffered.c
@@ -704,7 +704,7 @@ ssize_t psock_tcp_send(FAR struct socket *psock,
 
               ret = net_timedwait(&state.snd_sem,
                                   _SO_TIMEOUT(psock->s_sndtimeo));
-              if (ret != -ETIMEDOUT || acked == state.snd_acked)
+              if (ret == -ETIMEDOUT && acked == state.snd_acked)
                 {
                   break; /* Timeout without any progress */
                 }