[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lwip-devel] [bug #20147] getsockopt() with SO_ERROR option

From: Frédéric Bernon
Subject: [lwip-devel] [bug #20147] getsockopt() with SO_ERROR option
Date: Mon, 11 Jun 2007 16:29:07 +0000
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; fr; rv: Gecko/20070515 Firefox/

Follow-up Comment #2, bug #20147 (project lwip):

(please, answer by the bug tracker to get a trace)

>Yup, the fix works good with a small correction.
>sock_set_errno(sock, err_to_errno(sock->conn->err)); /* PATCH
>note: sock->conn->err instead of conn->err*/

Yes you're right. Can you also confirm that err_tcp is called?

>But the returned socket error is EIO (0x5) which seems to be inconsistent
with the error values returned by the standard getsockopt() error values. I
guess we have to return EINVAL if connection is closed.

There is a table to match lwip error code with BSD error code (at the
beginning of sockets.c file). In this table, you could see:

EIO,           /* ERR_ARG     -8      Illegal argument.        */

Perhaps, if you display the "err" field in err_tcp(), perhaps the code is
ERR_ARG. One other possibility is that the "err" code is not "inside" the
err_to_errno_table (in such case, EIO seems to be the value). Can you display
err from err_tcp, and sock->conn->err, and tell me your values?


Reply to this item at:


  Message posté via/par Savannah

reply via email to

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