Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Sep 17, 2010, 12:48:29 AM (14 years ago)
Author:
adrfried
Message:

Merged ipv6 branch

Orxonox now includes a modified version of ENet 1.3.0

Location:
code/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • code/trunk

  • code/trunk/src/libraries/network/LANDiscoverable.cc

    r7163 r7459  
    6464    if( bActive )
    6565    {
    66       ENetAddress bindAddress = { ENET_HOST_ANY, LAN_DISCOVERY_PORT };
     66      ENetAddress bindAddress;
     67      memset(& bindAddress, 0, sizeof(ENetAddress));
     68      bindAddress.host = ENET_HOST_ANY;
     69      bindAddress.port = LAN_DISCOVERY_PORT;
    6770      assert( this->host_ == 0 );
    68       this->host_ = enet_host_create( &bindAddress, 10, 0, 0 );
     71      this->host_ = enet_host_create( &bindAddress, 10, 0, 0, 0 );
     72      if ( this->host_ == NULL )
     73          COUT(1) << "LANDiscoverable: host_ == NULL" << std::endl;
    6974    }
    7075    else
     
    8994      {
    9095        case ENET_EVENT_TYPE_CONNECT:
     96            COUT(4) << "Received LAN discovery connect from client " << event.peer->host->receivedAddress << std::endl;
     97            break;
    9198        case ENET_EVENT_TYPE_DISCONNECT:
    9299        case ENET_EVENT_TYPE_NONE:
     
    95102          if( strcmp( LAN_DISCOVERY_MESSAGE, (char*)event.packet->data ) == 0 )      // check for a suitable orxonox client
    96103          {
     104            COUT(3) << "Received LAN discovery message from client " << event.peer->host->receivedAddress << std::endl;
    97105            packet::ServerInformation info;
    98106            info.setServerName("Orxonox Server");
Note: See TracChangeset for help on using the changeset viewer.