[haiku-commits] r38415 - haiku/trunk/src/add-ons/kernel/network/protocols/udp

  • From: axeld@xxxxxxxxxxxxxxxx
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Sat, 28 Aug 2010 12:41:57 +0200 (CEST)

Author: axeld
Date: 2010-08-28 12:41:57 +0200 (Sat, 28 Aug 2010)
New Revision: 38415
Changeset: http://dev.haiku-os.org/changeset/38415

Modified:
   haiku/trunk/src/add-ons/kernel/network/protocols/udp/udp.cpp
Log:
* Fixed broken UDP for non device bound sockets.


Modified: haiku/trunk/src/add-ons/kernel/network/protocols/udp/udp.cpp
===================================================================
--- haiku/trunk/src/add-ons/kernel/network/protocols/udp/udp.cpp        
2010-08-28 09:36:59 UTC (rev 38414)
+++ haiku/trunk/src/add-ons/kernel/network/protocols/udp/udp.cpp        
2010-08-28 10:41:57 UTC (rev 38415)
@@ -505,8 +505,8 @@
                std::make_pair(ourAddress, peerAddress));
 
        // Make sure the bound_to_device constraint is fulfilled
-       while (endpoint != NULL && index != 0
-               && endpoint->socket->bound_to_device != index) {
+       while (endpoint != NULL && endpoint->socket->bound_to_device != 0
+               && index != 0 && endpoint->socket->bound_to_device != index) {
                endpoint = endpoint->HashTableLink();
                if (endpoint != NULL
                        && (!endpoint->LocalAddress().EqualTo(ourAddress, true)


Other related posts:

  • » [haiku-commits] r38415 - haiku/trunk/src/add-ons/kernel/network/protocols/udp - axeld