[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lwip-devel] [bug #38219] Assert on TCP netconn_write with sndtimeout se
From: |
Matthias Blaicher |
Subject: |
[lwip-devel] [bug #38219] Assert on TCP netconn_write with sndtimeout set |
Date: |
Mon, 18 Feb 2013 13:29:26 +0000 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.70 Safari/537.17 |
Follow-up Comment #3, bug #38219 (project lwip):
I also just ran into this issue. The assert triggers, because
msg->conn->current_msg is 0, but msg->conn->write_offset is not.
I tried adding conn->write_offset = 0; in the partial write branch if
do_write_more:
#if LWIP_SO_SNDTIMEO
if ((conn->send_timeout != 0) &&
((s32_t)(sys_now() - conn->current_msg->msg.w.time_started) >=
conn->send_timeout)) {
write_finished = 1;
if (conn->write_offset == 0) {
/* nothing has been written */
err = ERR_WOULDBLOCK;
conn->current_msg->msg.w.len = 0;
} else {
/* partial write */
err = ERR_OK;
conn->current_msg->msg.w.len = conn->write_offset;
conn->write_offset = 0; /* <= ADDED THIS */
}
} else
#endif /* LWIP_SO_SNDTIMEO */
Which seems to fix my problems.
_______________________________________________________
Reply to this item at:
<http://savannah.nongnu.org/bugs/?38219>
_______________________________________________
Message sent via/by Savannah
http://savannah.nongnu.org/