]> git.lizzy.rs Git - minetest.git/blobdiff - src/serverlist.cpp
Don't erase modified_blocks
[minetest.git] / src / serverlist.cpp
index 77b0ceef1edb08803e9dcdddd35609501731b1d0..3dfc79f50cb4067a093308d4b7941ca8d0b1f70a 100644 (file)
@@ -1,6 +1,6 @@
 /*
 Minetest
-Copyright (C) 2011 celeron55, Perttu Ahola <celeron55@gmail.com>
+Copyright (C) 2013 celeron55, Perttu Ahola <celeron55@gmail.com>
 
 This program is free software; you can redistribute it and/or modify
 it under the terms of the GNU Lesser General Public License as published by
@@ -84,6 +84,7 @@ std::vector<ServerListSpec> getOnline()
        {
                CURLcode res;
 
+               curl_easy_setopt(curl, CURLOPT_NOSIGNAL, 1);
                curl_easy_setopt(curl, CURLOPT_URL, (g_settings->get("serverlist_url")+"/list").c_str());
                curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, ServerList::WriteCallback);
                curl_easy_setopt(curl, CURLOPT_WRITEDATA, &liststring);
@@ -258,6 +259,7 @@ void sendAnnounce(std::string action, u16 clients) {
        if (curl)
        {
                CURLcode res;
+               curl_easy_setopt(curl, CURLOPT_NOSIGNAL, 1);
                curl_easy_setopt(curl, CURLOPT_URL, (g_settings->get("serverlist_url")+std::string("/announce?json=")+curl_easy_escape(curl, writer.write( server ).c_str(), 0)).c_str());
                //curl_easy_setopt(curl, CURLOPT_USERAGENT, "minetest");
                curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, ServerList::ServerAnnounceCallback);