Changeset 7459 for code/trunk/src/libraries/network/LANDiscoverable.cc
- Timestamp:
- Sep 17, 2010, 12:48:29 AM (14 years ago)
- Location:
- code/trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
code/trunk
- Property svn:mergeinfo changed
/code/branches/ipv6 (added) merged: 7293-7295,7320,7322,7328-7330,7376-7378,7381-7382,7384-7387,7389-7394,7396-7397,7402,7411,7414,7433,7435,7437-7438,7442-7443,7453-7454
- Property svn:mergeinfo changed
-
code/trunk/src/libraries/network/LANDiscoverable.cc
r7163 r7459 64 64 if( bActive ) 65 65 { 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; 67 70 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; 69 74 } 70 75 else … … 89 94 { 90 95 case ENET_EVENT_TYPE_CONNECT: 96 COUT(4) << "Received LAN discovery connect from client " << event.peer->host->receivedAddress << std::endl; 97 break; 91 98 case ENET_EVENT_TYPE_DISCONNECT: 92 99 case ENET_EVENT_TYPE_NONE: … … 95 102 if( strcmp( LAN_DISCOVERY_MESSAGE, (char*)event.packet->data ) == 0 ) // check for a suitable orxonox client 96 103 { 104 COUT(3) << "Received LAN discovery message from client " << event.peer->host->receivedAddress << std::endl; 97 105 packet::ServerInformation info; 98 106 info.setServerName("Orxonox Server");
Note: See TracChangeset
for help on using the changeset viewer.