lwip-devel
[Top][All Lists]
Advanced

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

[lwip-devel] [bug #43110] call getpeername() before listen() will cause


From: hanhui
Subject: [lwip-devel] [bug #43110] call getpeername() before listen() will cause a error.
Date: Sat, 30 Aug 2014 15:30:47 +0000
User-agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/33.0.1750.149 Safari/537.36

URL:
  <http://savannah.nongnu.org/bugs/?43110>

                 Summary: call getpeername() before listen() will cause a
error.
                 Project: lwIP - A Lightweight TCP/IP stack
            Submitted by: hanhui03
            Submitted on: Sat 30 Aug 2014 03:30:46 PM GMT
                Category: sockets/netconn
                Severity: 3 - Normal
              Item Group: Change Request
                  Status: None
                 Privacy: Public
             Assigned to: None
             Open/Closed: Open
         Discussion Lock: Any
         Planned Release: 
            lwIP version: git head

    _______________________________________________________

Details:

Hello All

     If call getpeername() before call listen(), this socket can NOT change to
listen mode. 

     For example:

     int s = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP);
     bind(s, ...);
     getpeername(s, ...);
     listen(s, ...); this socket can not listen!

     because getpeername() will cause a fatal error when socket is not
connect. listen just check if socket has a fatal error, will not listen.

     But in Qt library, QTcpServer will fist get socket status (will call
getpeername()) before call listen. This calling sequence will OK in BSD, Linux
and Windows, but fail in Lwip.




     Han.hui





    _______________________________________________________

Reply to this item at:

  <http://savannah.nongnu.org/bugs/?43110>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.nongnu.org/




reply via email to

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