Fixed bug #20021: Moved sendbuf-processing in netconn_write from api_lib.c to api_msg.c to also prevent multiple context-changes on low memory or empty send-buffer.

This commit is contained in:
goldsimon
2007-06-21 18:40:21 +00:00
parent 4c07b1606c
commit 9f05cabf87
4 changed files with 165 additions and 79 deletions

View File

@@ -118,6 +118,19 @@ struct netconn {
int recv_timeout;
#endif /* LWIP_SO_RCVTIMEO */
u16_t recv_avail;
/** TCP: when data passed to netconn_write doesn't fit into the send buffer,
this temporarily stores the message. */
struct api_msg_msg *write_msg;
/** TCP: when data passed to netconn_write doesn't fit into the send buffer,
this temporarily stores how much is already sent. */
u16_t write_offset;
#if LWIP_TCPIP_CORE_LOCKING
/** TCP: when data passed to netconn_write doesn't fit into the send buffer,
this temporarily stores whether to wake up the original application task
if data couldn't be sent in the first try. */
u8_t write_delayed;
#endif
void (* callback)(struct netconn *, enum netconn_evt, u16_t len);
};