Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 7745


Ignore:
Timestamp:
Dec 8, 2010, 5:35:36 PM (13 years ago)
Author:
smerkli
Message:

Removed some things and fixed some bugs

Location:
code/branches/presentation/src/libraries/network
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • code/branches/presentation/src/libraries/network/MasterServerComm.cc

    r7739 r7745  
    8787    if (this->peer == NULL )
    8888    { COUT(2) << "ERROR: No available peers for initiating an ENet connection.\n";
    89     //exit (EXIT_FAILURE);
    9089    return -1;
    9190    }
     
    9493    if (enet_host_service (this->client, this->event, 2000) > 0 &&
    9594        this->event->type == ENET_EVENT_TYPE_CONNECT )
    96       fprintf( stdout, "Connection to server succeeded." );
     95      COUT(3) << "Connection to master server succeeded.\n";
    9796    else
    9897    {
    9998      enet_peer_reset (this->peer);
    10099      fprintf( stdout, "Connection to %s failed.", address );
    101       //exit(EXIT_FAILURE);
     100      COUT(2) << "ERROR: connection to " << address << " failed.\n";
    102101      return -1;
    103102    }
  • code/branches/presentation/src/libraries/network/MasterServerComm.h

    r7739 r7745  
    2626 *
    2727 */
     28
     29#ifndef MASTERSERVERCOMM_H
     30#define MASTERSERVERCOMM_H
    2831
    2932#include <cstdlib>
     
    9598
    9699}
     100
     101#endif /* MASTERSERVERCOMM_H */
  • code/branches/presentation/src/libraries/network/Server.cc

    r7740 r7745  
    6060#include "FunctionCallManager.h"
    6161#include "GamestateManager.h"
     62#include "WANDiscovery.h"
    6263
    6364namespace orxonox
     
    110111
    111112    /* connect and see if it worked */
    112     if( msc.connect( MS_ADDRESS, ORX_MSERVER_PORT ) )
     113    if( msc.connect( WANDiscovery::getInstance().getMSAddress().c_str(),
     114      ORX_MSERVER_PORT ) )
    113115    { COUT(1) << "Error: could not connect to master server!\n";
    114116      return;
  • code/branches/presentation/src/libraries/network/WANDiscovery.h

    r7739 r7745  
    11/*
    2  *   ORXONOX - the hottest 3D action shooter ever to exist
    3  *                    > www.orxonox.net <
     2 *   ORXONOX - the hottest 3D action shooter ever to exist > www.orxonox.net <
    43 *
    54 *
    65 *   License notice:
    76 *
    8  *   This program is free software; you can redistribute it and/or
    9  *   modify it under the terms of the GNU General Public License
    10  *   as published by the Free Software Foundation; either version 2
    11  *   of the License, or (at your option) any later version.
     7 *   This program is free software; you can redistribute it and/or modify it
     8 *   under the terms of the GNU General Public License as published by the Free
     9 *   Software Foundation; either version 2 of the License, or (at your option)
     10 *   any later version.
    1211 *
    13  *   This program is distributed in the hope that it will be useful,
    14  *   but WITHOUT ANY WARRANTY; without even the implied warranty of
    15  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    16  *   GNU General Public License for more details.
     12 *   This program is distributed in the hope that it will be useful, but
     13 *   WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
     14 *   or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
     15 *   for more details.
    1716 *
    18  *   You should have received a copy of the GNU General Public License
    19  *   along with this program; if not, write to the Free Software
    20  *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
     17 *   You should have received a copy of the GNU General Public License along
     18 *   with this program; if not, write to the Free Software Foundation, Inc., 51
     19 *   Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
    2120 *
    22  *   Author:
    23  *      Fabian 'x3n' Landau (original)
    24  *   Co-authors:
    25  *      Sandro 'smerkli' Merkli (copied and adapted to WAN)
     21 *   Author: Fabian 'x3n' Landau (original) Co-authors: Sandro 'smerkli' Merkli
     22 *   (copied and adapted to WAN)
    2623 *
    2724 */
    2825
    29 #ifndef WANDISCOVERY_H
     26#ifndef WANDISCOVERY_H 
    3027#define WANDISCOVERY_H
    3128
     
    5956      /** destructor */
    6057      ~WANDiscovery();
     58
     59      /** get content of msaddress */
     60      std::string getMSAddress()
     61      { return this->msaddress; }
    6162
    6263      /** ask server for server list  */
  • code/branches/presentation/src/libraries/network/packet/ServerInformation.cc

    r7461 r7745  
    5858      char* ack = new char[strlen(LAN_DISCOVERY_ACK)+1];
    5959      loadAndIncrease((char*&)ack, temp);
    60       assert(strcmp(ack, (const char*)LAN_DISCOVERY_ACK)==0);
     60
     61      /* Fabian, what is this used for? it crashes the masterserver, hence commenting it */
     62      //assert(strcmp(ack, (const char*)LAN_DISCOVERY_ACK)==0);
     63
    6164      // Save Server Name
    6265      loadAndIncrease(this->serverName_, temp);
Note: See TracChangeset for help on using the changeset viewer.