Node highlighting.
[oweals/minetest.git] / src / clientmedia.cpp
index 35074a113247f8762bfdb0397856f93366057f84..c1043c76915533be036f119612a74bf5d5219866 100644 (file)
@@ -110,14 +110,16 @@ void ClientMediaDownloader::addRemoteServer(std::string baseurl)
 
        #ifdef USE_CURL
 
-       infostream << "Client: Adding remote server \""
-               << baseurl << "\" for media download" << std::endl;
-
-       RemoteServerStatus *remote = new RemoteServerStatus;
-       remote->baseurl = baseurl;
-       remote->active_count = 0;
-       remote->request_by_filename = false;
-       m_remotes.push_back(remote);
+       if (g_settings->getBool("enable_remote_media_server")) {
+               infostream << "Client: Adding remote server \""
+                       << baseurl << "\" for media download" << std::endl;
+
+               RemoteServerStatus *remote = new RemoteServerStatus;
+               remote->baseurl = baseurl;
+               remote->active_count = 0;
+               remote->request_by_filename = false;
+               m_remotes.push_back(remote);
+       }
 
        #else
 
@@ -264,7 +266,7 @@ void ClientMediaDownloader::initialStep(Client *client)
                        fetchrequest.request_id = m_httpfetch_next_id; // == i
                        fetchrequest.timeout = m_httpfetch_timeout;
                        fetchrequest.connect_timeout = m_httpfetch_timeout;
-                       fetchrequest.post_fields = required_hash_set;
+                       fetchrequest.post_data = required_hash_set;
                        fetchrequest.extra_headers.push_back(
                                "Content-Type: application/octet-stream");
                        httpfetch_async(fetchrequest);