Corrected comment in do_writemore()

This commit is contained in:
goldsimon 2008-03-19 20:59:59 +00:00
parent 7fa9010f35
commit 90cb4b4e09

View File

@ -977,6 +977,10 @@ do_writemore(struct netconn *conn)
API_EVENT(conn, NETCONN_EVT_SENDMINUS, len); API_EVENT(conn, NETCONN_EVT_SENDMINUS, len);
} }
} else if (err == ERR_MEM) { } else if (err == ERR_MEM) {
/* If ERR_MEM, we wait for sent_tcp or poll_tcp to be called
we do NOT return to the application thread, since ERR_MEM is
only a temporary error! */
/* tcp_enqueue returned ERR_MEM, try tcp_output anyway */ /* tcp_enqueue returned ERR_MEM, try tcp_output anyway */
err = tcp_output(conn->pcb.tcp); err = tcp_output(conn->pcb.tcp);
@ -984,8 +988,8 @@ do_writemore(struct netconn *conn)
conn->write_delayed = 1; conn->write_delayed = 1;
#endif #endif
} else { } else {
/* if ERR_MEM, we wait for sent_tcp or poll_tcp to be called /* On errors != ERR_MEM, we don't try writing any more but return
on other errors we don't try writing any more */ the error to the application thread. */
conn->err = err; conn->err = err;
write_finished = 1; write_finished = 1;
} }