[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lwip-devel] [bug #31084] socket API returns always EMSGSIZE on non-bloc
From: |
SandrineLWI1565 |
Subject: |
[lwip-devel] [bug #31084] socket API returns always EMSGSIZE on non-blocking sockets if data size > send buffers |
Date: |
Wed, 24 Aug 2011 15:37:46 +0000 |
User-agent: |
Mozilla/5.0 (Windows NT 6.1; rv:5.0) Gecko/20100101 Firefox/5.0 |
Follow-up Comment #6, bug #31084 (project lwip):
Hello All,
I use lwip-1.4.0. I need using non-blocking socket. So I have applied patch
done at 2011-07-22 20:05:24 on the Git master branch. I have only done changes
described in this commit on the 1.4.0 release version.
I call lwip_send(1, data=0x2000c030, size=2050, flags=0x0) on a socket alreay
in non blocking mode (no need using MSG_DONTWAIT flag).
Unfortunally, it fails with logs
lwip_send(1, data=0x2000c030, size=2050, flags=0x0)
tcp_write(pcb=0x20001810, data=0x2000c030, len=1072, apiflags=1)
tcp_write: queuelen: 0
tcp_write: queueing 6511:7047
tcp_write: queueing 7047:7583
tcp_write: 2 (after enqueued)
tcp_output_segment: 6511:7047
lwip_send(1) err=0 written=1072
lwip_send(1, data=0x2000c460, size=978, flags=0x0)
do_writemore: No more tcp_sndbuf available
lwip_send(1) err=-7 written=0
where "do_writemore: No more tcp_sndbuf available" is a log in code
do_writemore(struct netconn *conn)
{
....
available = tcp_sndbuf(conn->pcb.tcp);
if (available < len) {
/* don't try to write more than sendbuf */
len = available;
if (dontblock){
if (!len) {
LWIP_DEBUGF(SOCKETS_DEBUG, ("do_writemore: No more tcp_sndbuf
availablen"));
err = ERR_WOULDBLOCK;
goto err_mem;
}
} else {
.......
Do you think the patch is correct on 1.4.0 version or do I need the GIT master
version? Do I have a problem with my buffers's size in opt.h?
Best Regards
Sandrine
_______________________________________________________
Reply to this item at:
<http://savannah.nongnu.org/bugs/?31084>
_______________________________________________
Message posté via/par Savannah
http://savannah.nongnu.org/
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [lwip-devel] [bug #31084] socket API returns always EMSGSIZE on non-blocking sockets if data size > send buffers,
SandrineLWI1565 <=