I fixed this section of code because it had ETIMEOUT instead of ETIMEDOUT and so caused a compilation failure.

Looking more carefully, net_timedwait() will return -ETIMEDOUT on the timeout.  So shouldn't the condition be (ret == -ETIMEDOUT && acked == state.snd_acked).  I will change the code that way but I really need your input.

   701           for (; ; )
   702             {
   703               uint32_t acked = state.snd_acked;
   704
   705               ret = net_timedwait(&state.snd_sem,
   706 _SO_TIMEOUT(psock->s_sndtimeo));
   707               if (ret != -ETIMEDOUT || acked == state.snd_acked)
   708                 {
   709                   break; /* Timeout without any progress */
   710                 }
   711             }

Greg


Reply via email to