Send Position packet on event, don't check it at each AsyncRunStep.
[oweals/minetest.git] / src / httpfetch.cpp
index f61dbbf71a1d473ba4f6ea3294b4405511b06ab9..981643f6cb8849f29e6a540c4ff36f6865d4a93b 100644 (file)
@@ -194,7 +194,6 @@ private:
        HTTPFetchRequest request;
        HTTPFetchResult result;
        std::ostringstream oss;
-       char *post_fields;
        struct curl_slist *http_header;
        curl_httppost *post;
 };
@@ -221,6 +220,11 @@ HTTPFetchOngoing::HTTPFetchOngoing(HTTPFetchRequest request_, CurlHandlePool *po
        curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, 1);
        curl_easy_setopt(curl, CURLOPT_MAXREDIRS, 1);
 
+       std::string bind_address = g_settings->get("bind_address");
+       if (!bind_address.empty()) {
+               curl_easy_setopt(curl, CURLOPT_INTERFACE, bind_address.c_str());
+       }
+
 #if LIBCURL_VERSION_NUM >= 0x071304
        // Restrict protocols so that curl vulnerabilities in
        // other protocols don't affect us.