From: <spo...@us...> - 2007-09-27 17:32:20
|
Revision: 798 http://opengate.svn.sourceforge.net/opengate/?rev=798&view=rev Author: spom_spom Date: 2007-09-27 10:32:13 -0700 (Thu, 27 Sep 2007) Log Message: ----------- no compilation problems Modified Paths: -------------- trunk/src/metaserver.cpp trunk/src/opengateserver.cpp Modified: trunk/src/metaserver.cpp =================================================================== --- trunk/src/metaserver.cpp 2007-09-26 20:28:50 UTC (rev 797) +++ trunk/src/metaserver.cpp 2007-09-27 17:32:13 UTC (rev 798) @@ -29,10 +29,9 @@ namespace OpenGate{ - MetaConnection::MetaConnection(asio::io_service & io_service, LogManagerBase & log ) : +MetaConnection::MetaConnection(asio::io_service & io_service, LogManagerBase & log ) : io_service_( io_service ), socket_( io_service ), resolver_( io_service ), log_( &log ) { - // Get instance to the log manager hostname_ = std::string( "opacma.ontheserver.de" ); log_->info( std::string( "Querying " ) + hostname_); @@ -237,7 +236,6 @@ } } - } catch ( asio::error & e) { log_->fatal( std::string( "asio::error: " ) + e.what() ); return -5; @@ -358,8 +356,8 @@ // Read the response status line. #ifdef WIN32 - // we dont have boost:regex within win32, i will fix this later (carsten) - //asio::read_until(socket_, response, "\n"); + // we dont have boost:regex within win32, i will fix this later (carsten) +//asio::read_until(socket_, response, "\n"); #else asio::read_until(socket_, response, boost::regex("\r\n")); #endif @@ -383,7 +381,7 @@ // Read the response headers, which are terminated by a blank line. #ifdef WIN32 - // we dont have boost:regex within win32, i will fix this later (carsten) + // we dont have boost:regex within win32, i will fix this later (carsten) //asio::read_until(socket_, response, "\n"); #else asio::read_until(socket_, response, boost::regex("\r\n\r\n")); Modified: trunk/src/opengateserver.cpp =================================================================== --- trunk/src/opengateserver.cpp 2007-09-26 20:28:50 UTC (rev 797) +++ trunk/src/opengateserver.cpp 2007-09-27 17:32:13 UTC (rev 798) @@ -42,8 +42,8 @@ if ( metaPtr ) { logMgr->info("Remove server from server list!"); int error = 0; - if ((error = metaPtr->remove_game_server()) < 0) { - logMgr->warn( std::string("Could not remove game server " + toStr (error)) ); + if ( (error = metaPtr->remove_game_server() ) < 0) { + logMgr->warn( std::string("Could not remove game server " + toStr ( error ) ) ); } } if ( serverPtr ) { @@ -78,7 +78,7 @@ //** das k\xF6nnte mal vielleicht als option rausreichen, das man wie beim clienten die Wahl hat; //** -M = (withMetaServer = true); - bool withMetaServer = false; + bool withMetaServer = true; try { asio::io_service io_service; @@ -90,7 +90,11 @@ int error = 0; if ((error = meta.add_game_server()) < 0) { logMgr->warn( std::string("Could not add game server " + toStr (error) ) ); - } + } + + //** ein bissle mehr verbose output, kommt sp\xE4ter wieder weg.; + std::list< std::string > serverOnline( meta.list_game_server() ); + copy( serverOnline.begin(), serverOnline.end(), std::ostream_iterator< std::string >( std::cout, " " ) ); } tcp::endpoint endpoint( tcp::v4(), OG_PORT ); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |