adding back some things in uni's code that i had removed for debugging

git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/branches/hilnius@13342 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
hilnius 2013-07-25 01:14:22 +00:00
parent 1ebfd0ada4
commit cc2a967969
5 changed files with 11 additions and 5 deletions

View File

@ -213,7 +213,9 @@ namespace Online{
// ============================================================================
CurrentUser::ServerJoinRequest * CurrentUser::requestServerJoin(uint32_t server_id){
CurrentUser::ServerJoinRequest * CurrentUser::requestServerJoin(uint32_t server_id,
bool request_now)
{
assert(m_state == US_SIGNED_IN || m_state == US_GUEST);
ServerJoinRequest * request = new ServerJoinRequest();
request->setURL((std::string)UserConfigParams::m_server_multiplayer + "address-management.php");
@ -221,6 +223,8 @@ namespace Online{
request->setParameter("token", m_token);
request->setParameter("id", m_id);
request->setParameter("server_id", server_id);
if (request_now)
HTTPManager::get()->addRequest(request);
return request;
}

View File

@ -109,7 +109,7 @@ namespace Online{
bool request_now = true);
SignOutRequest * requestSignOut();
ServerCreationRequest * requestServerCreation( const irr::core::stringw &name, int max_players);
ServerJoinRequest * requestServerJoin( uint32_t server_id);
ServerJoinRequest * requestServerJoin( uint32_t server_id, bool request_now = true);
// Register

View File

@ -80,7 +80,7 @@ namespace Online{
}
// ============================================================================
ServersManager::RefreshRequest * ServersManager::refreshRequest()
ServersManager::RefreshRequest * ServersManager::refreshRequest(bool request_now)
{
RefreshRequest * request = NULL;
if(Time::getRealTime() - m_last_load_time > SERVER_REFRESH_INTERVAL)
@ -88,6 +88,8 @@ namespace Online{
request = new RefreshRequest();
request->setURL((std::string)UserConfigParams::m_server_multiplayer + "client-user.php");
request->setParameter("action",std::string("get_server_list"));
if (request_now)
HTTPManager::get()->addRequest(request);
}
return request;
}

View File

@ -69,7 +69,7 @@ namespace Online {
static void release();
static void deallocate();
RefreshRequest * refreshRequest();
RefreshRequest * refreshRequest(bool request_now = true);
void setJoinedServer(uint32_t server_id);
void unsetJoinedServer();
void addServer(Server * server);

View File

@ -238,7 +238,7 @@ void OnlineScreen::eventCallback(Widget* widget, const std::string& name, const
Server * server = ServersManager::acquire()->getQuickPlay();
ServersManager::release();
Online::CurrentUser::ServerJoinRequest* request2 = Online::CurrentUser::acquire()->requestServerJoin( server->getServerId());
Online::CurrentUser::ServerJoinRequest* request2 = Online::CurrentUser::acquire()->requestServerJoin( server->getServerId(), false);
Online::CurrentUser::release();
if (request2)
{