lwip-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lwip-devel] [patch #8882] Vector improvements


From: Joel Cunningham
Subject: [lwip-devel] [patch #8882] Vector improvements
Date: Fri, 17 Feb 2017 16:20:32 -0500 (EST)
User-agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:51.0) Gecko/20100101 Firefox/51.0

Follow-up Comment #36, patch #8882 (project lwip):

Simon,

Those changes from msg.w.len = 0 to msg.w.offset = 0 are in error cases.

If a non-blocking write does a partial write due to filling send buffer, the
write will be limited to the size of the send buffer and then the below case
will enter write_finished (assuming tcp_write returns ERR_OK)


if (err == ERR_OK) {
  err_t out_err;
  conn->current_msg->msg.w.offset += len;
  if ((conn->current_msg->msg.w.offset == conn->current_msg->msg.w.len) ||
dontblock) {
    /* return sent length (caller reads length from msg.w.offset) */
    /* everything was written */
    write_finished = 1;
   }


Maybe we should remove the "everything was written" comment because it's not
correct.

If a non-blocking write encounters ERR_MEM from tcp_write(), it will return
ERR_WOULDBLOCK and 0 for bytes written because tcp_write did not accept the
buffer



    _______________________________________________________

Reply to this item at:

  <http://savannah.nongnu.org/patch/?8882>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.nongnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]