Some fixes in the sequence of quiting STK. Though the thread still gets killed before the request is done.
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/branches/uni@13667 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
parent
ed37d53be6
commit
5ba1493990
@ -1242,6 +1242,8 @@ void cleanSuperTuxKart()
|
|||||||
|
|
||||||
if(INetworkHttp::get())
|
if(INetworkHttp::get())
|
||||||
INetworkHttp::get()->stopNetworkThread();
|
INetworkHttp::get()->stopNetworkThread();
|
||||||
|
if(Online::HTTPManager::isRunning())
|
||||||
|
Online::HTTPManager::get()->stopNetworkThread();
|
||||||
//delete in reverse order of what they were created in.
|
//delete in reverse order of what they were created in.
|
||||||
//see InitTuxkart()
|
//see InitTuxkart()
|
||||||
Online::ServersManager::deallocate();
|
Online::ServersManager::deallocate();
|
||||||
@ -1250,9 +1252,6 @@ void cleanSuperTuxKart()
|
|||||||
Online::CurrentUser::deallocate();
|
Online::CurrentUser::deallocate();
|
||||||
GUIEngine::DialogQueue::deallocate();
|
GUIEngine::DialogQueue::deallocate();
|
||||||
|
|
||||||
if(Online::HTTPManager::isRunning())
|
|
||||||
Online::HTTPManager::get()->stopNetworkThread();
|
|
||||||
|
|
||||||
|
|
||||||
Referee::cleanup();
|
Referee::cleanup();
|
||||||
if(ReplayPlay::get()) ReplayPlay::destroy();
|
if(ReplayPlay::get()) ReplayPlay::destroy();
|
||||||
|
@ -623,7 +623,7 @@ namespace Online{
|
|||||||
{
|
{
|
||||||
if(isRegisteredUser())
|
if(isRegisteredUser())
|
||||||
{
|
{
|
||||||
HTTPRequest * request = new HTTPRequest(true, HTTPManager::MAX_PRIORITY);
|
XMLRequest * request = new XMLRequest(true, HTTPManager::MAX_PRIORITY);
|
||||||
request->setURL((std::string)UserConfigParams::m_server_multiplayer + "client-user.php");
|
request->setURL((std::string)UserConfigParams::m_server_multiplayer + "client-user.php");
|
||||||
request->setParameter("action", std::string("client-quit"));
|
request->setParameter("action", std::string("client-quit"));
|
||||||
request->setParameter("token", getToken());
|
request->setParameter("token", getToken());
|
||||||
|
@ -134,7 +134,7 @@ namespace Online{
|
|||||||
// and we couldn't finish STK. This way we request an abort of
|
// and we couldn't finish STK. This way we request an abort of
|
||||||
// a download, which mean we can get the mutex and ask the service
|
// a download, which mean we can get the mutex and ask the service
|
||||||
// thread here to cancel properly.
|
// thread here to cancel properly.
|
||||||
cancelAllDownloads();
|
//cancelAllDownloads(); FIXME if used this way it also cancels the client-quit action
|
||||||
CurrentUser::get()->onSTKQuit();
|
CurrentUser::get()->onSTKQuit();
|
||||||
addRequest(new Request(true, MAX_PRIORITY, Request::RT_QUIT));
|
addRequest(new Request(true, MAX_PRIORITY, Request::RT_QUIT));
|
||||||
} // stopNetworkThread
|
} // stopNetworkThread
|
||||||
|
@ -123,6 +123,7 @@ namespace Online{
|
|||||||
postString.append(escaped);
|
postString.append(escaped);
|
||||||
curl_free(escaped);
|
curl_free(escaped);
|
||||||
}
|
}
|
||||||
|
Log::info( "HTTPRequest::operation", "Sending : %s", postString.c_str());
|
||||||
curl_easy_setopt(m_curl_session, CURLOPT_POSTFIELDS, postString.c_str());
|
curl_easy_setopt(m_curl_session, CURLOPT_POSTFIELDS, postString.c_str());
|
||||||
std::string uagent( std::string("SuperTuxKart/") + STK_VERSION );
|
std::string uagent( std::string("SuperTuxKart/") + STK_VERSION );
|
||||||
#ifdef WIN32
|
#ifdef WIN32
|
||||||
|
Loading…
Reference in New Issue
Block a user