Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Aug 9, 2011, 12:37:21 AM (13 years ago)
Author:
landauf
Message:

Quick and dirty fix to un-singletonize WANDiscovery. It is now created on demand by the multiplayer menu. This delays the master server connection until we really need it (and avoids the annoying connection-failed error/warning during startup if the master server can't be reached).
Also removed some unneeded/commented functions related to WANDiscovery from Server.
Presumably won't collide with the changes in the masterserver2 branch, but needs some review.

File:
1 edited

Legend:

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

    r8807 r8832  
    2929#include "MasterServerComm.h"
    3030#include "util/Output.h"
     31#include "WANDiscovery.h"
    3132
    3233namespace orxonox
     
    149150   * so we can also make callbacks from objects
    150151   */
    151   int MasterServerComm::pollForReply( int (*callback)( char*, ENetEvent* ),
    152     int delayms )
     152  int MasterServerComm::pollForReply( WANDiscovery* listener, int delayms )
    153153  {
    154154    /* see whether anything happened */
     
    193193
    194194          /* call the supplied callback, if any. */
    195           if( (*callback) != NULL )
    196             retval = (*callback)( addrconv, &(this->event) );
     195          if( listener != NULL )
     196            retval = listener->rhandler( addrconv, &(this->event) );
    197197
    198198          /* clean up */
Note: See TracChangeset for help on using the changeset viewer.