Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 7295


Ignore:
Timestamp:
Aug 31, 2010, 6:13:21 PM (14 years ago)
Author:
adrfried
Message:

some compatability changes for ipv6-patched enet

Location:
code/branches/ipv6/src/libraries/network
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • code/branches/ipv6/src/libraries/network/ClientInformation.cc

    r6417 r7295  
    216216    ClientInformation *temp = head_;
    217217    while(temp!=0){
    218       if(temp->getPeer()->address.host==peer->address.host && temp->getPeer()->address.port==peer->address.port)
     218      if(!memcmp(& temp->getPeer()->address, & peer->address, sizeof(peer->address)))
    219219        break;
    220220      temp = temp->next();
     
    250250    ClientInformation *temp = head_;
    251251    while(temp!=0){
    252       if(temp->getPeer()->address.host==address->host && temp->getPeer()->address.port == address->port)
     252      if(!memcmp(& temp->getPeer()->address, address, sizeof(*address)))
    253253        break;
    254254      temp = temp->next();
  • code/branches/ipv6/src/libraries/network/LANDiscoverable.cc

    r7294 r7295  
    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 );
    6871      this->host_ = enet_host_create( &bindAddress, 10, 0, 0, 0 );
  • code/branches/ipv6/src/libraries/network/LANDiscovery.cc

    r7294 r7295  
    6767        case ENET_EVENT_TYPE_CONNECT:
    6868        {
    69           COUT(0) << "connect from server: " << event.peer->address.host << endl;
     69          //COUT(0) << "connect from server: " << event.peer->address.host << endl; FIXME
    7070          ENetPacket* packet = enet_packet_create(LAN_DISCOVERY_MESSAGE, strlen(LAN_DISCOVERY_MESSAGE)+1, ENET_PACKET_FLAG_RELIABLE);
    7171          enet_peer_send(event.peer, 0, packet);
  • code/branches/ipv6/src/libraries/network/ServerConnection.cc

    r7294 r7295  
    4444  {
    4545    this->bindAddress_ = new ENetAddress();
     46    memset(this->bindAddress_, 0, sizeof(ENetAddress));
    4647    this->bindAddress_->host = ENET_HOST_ANY;
    4748    this->bindAddress_->port = NETWORK_PORT;
Note: See TracChangeset for help on using the changeset viewer.