From 60b8a8245c15701d1da4441ecc8c396d2b262b91 Mon Sep 17 00:00:00 2001 From: David Kocik Date: Fri, 3 Dec 2021 09:47:51 +0100 Subject: [PATCH] Deleted unused function in Octoprint --- src/slic3r/Utils/OctoPrint.cpp | 17 +---------------- src/slic3r/Utils/OctoPrint.hpp | 1 - 2 files changed, 1 insertion(+), 17 deletions(-) diff --git a/src/slic3r/Utils/OctoPrint.cpp b/src/slic3r/Utils/OctoPrint.cpp index 43e6145f5..250b16b4a 100644 --- a/src/slic3r/Utils/OctoPrint.cpp +++ b/src/slic3r/Utils/OctoPrint.cpp @@ -207,7 +207,7 @@ bool OctoPrint::upload(PrintHostUpload upload_data, ProgressFn prorgess_fn, Erro // This new address returns in "test_msg_or_host_ip" variable. // Solves troubles of uploades failing with name address. // in original address (m_host) replace host for resolved ip - url = substitute_host(make_url("api/files/local", m_host), GUI::into_u8(test_msg_or_host_ip)); + url = substitute_host(make_url("api/files/local"), GUI::into_u8(test_msg_or_host_ip)); BOOST_LOG_TRIVIAL(info) << "Upload address after ip resolve: " << url; } #endif // _WIN32 @@ -276,21 +276,6 @@ std::string OctoPrint::make_url(const std::string &path) const } } -std::string OctoPrint::make_url(const std::string& path, const std::string& addr) const -{ - std::string hst = addr.empty() ? m_host : addr; - if (hst.find("http://") == 0 || hst.find("https://") == 0) { - if (hst.back() == '/') { - return (boost::format("%1%%2%") % hst % path).str(); - } - else { - return (boost::format("%1%/%2%") % hst % path).str(); - } - } else { - return (boost::format("http://%1%/%2%") % hst % path).str(); - } -} - SL1Host::SL1Host(DynamicPrintConfig *config) : OctoPrint(config), m_authorization_type(dynamic_cast*>(config->option("printhost_authorization_type"))->value), diff --git a/src/slic3r/Utils/OctoPrint.hpp b/src/slic3r/Utils/OctoPrint.hpp index 7945cfdb1..262efe9ff 100644 --- a/src/slic3r/Utils/OctoPrint.hpp +++ b/src/slic3r/Utils/OctoPrint.hpp @@ -44,7 +44,6 @@ private: virtual void set_auth(Http &http) const; std::string make_url(const std::string &path) const; - std::string make_url(const std::string& path, const std::string& addr) const; }; class SL1Host: public OctoPrint