[Top][All Lists]

[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):


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

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


Reply to this item at:


  Message sent via/by Savannah

reply via email to

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