lwip-devel
[Top][All Lists]
Advanced

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

[lwip-devel] [patch #8848] tcp_bind/tcp_connect: Omit checking for the s


From: Axel Lin
Subject: [lwip-devel] [patch #8848] tcp_bind/tcp_connect: Omit checking for the same port if no port specified
Date: Sun, 10 Jan 2016 14:51:16 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.86 Safari/537.36

URL:
  <http://savannah.nongnu.org/patch/?8848>

                 Summary: tcp_bind/tcp_connect: Omit checking for the same
port if no port specified
                 Project: lwIP - A Lightweight TCP/IP stack
            Submitted by: axellin
            Submitted on: Sun 10 Jan 2016 02:51:15 PM GMT
                Category: None
                Priority: 5 - Normal
                  Status: None
                 Privacy: Public
             Assigned to: None
        Originator Email: 
             Open/Closed: Open
         Discussion Lock: Any
         Planned Release: None

    _______________________________________________________

Details:

No port specified means to use a random port.
tcp_new_port() returns a new (free) local TCP port number on success.
So in this case we don't need iterating all lists to test if the port
number is used, tcp_new_port() alreay ensures the port is not used.

Note:
Because of the one more level of indent after adding the else part for
if (port == 0), the diff looks much bigger than it should be.



    _______________________________________________________

File Attachments:


-------------------------------------------------------
Date: Sun 10 Jan 2016 02:51:15 PM GMT  Name:
0001-tcp_bind-tcp_connect-Omit-checking-for-the-same-port.patch  Size: 5kB  
By: axellin

<http://savannah.nongnu.org/patch/download.php?file_id=35971>

    _______________________________________________________

Reply to this item at:

  <http://savannah.nongnu.org/patch/?8848>

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




reply via email to

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