diff --git a/Common/XLXHostsFileDownloader.cpp b/Common/HostsFileDownloader.cpp similarity index 85% rename from Common/XLXHostsFileDownloader.cpp rename to Common/HostsFileDownloader.cpp index 0209378..12062c8 100644 --- a/Common/XLXHostsFileDownloader.cpp +++ b/Common/HostsFileDownloader.cpp @@ -20,17 +20,17 @@ #include #include -#include "XLXHostsFileDownloader.h" +#include "HostsFileDownloader.h" #include "Log.h" -size_t CXLXHostsFileDownloader::write_data(void *ptr, size_t size, size_t nmemb, FILE *stream) +size_t CHostsFileDownloader::write_data(void *ptr, size_t size, size_t nmemb, FILE *stream) { size_t written = fwrite(ptr, size, nmemb, stream); return written; } -/* wxHTTP randomly crashes when called on a worker thread, this must be called from main thread ! */ -std::string CXLXHostsFileDownloader::download(const std::string & xlxHostsFileURL) + +std::string CHostsFileDownloader::download(const std::string & xlxHostsFileURL) { CURL *curl; FILE *fp; diff --git a/Common/XLXHostsFileDownloader.h b/Common/HostsFileDownloader.h similarity index 96% rename from Common/XLXHostsFileDownloader.h rename to Common/HostsFileDownloader.h index 5c43a05..3f26182 100644 --- a/Common/XLXHostsFileDownloader.h +++ b/Common/HostsFileDownloader.h @@ -21,7 +21,7 @@ #include -class CXLXHostsFileDownloader { +class CHostsFileDownloader { public: static std::string download(const std::string & xlxHostsFileURL); private: diff --git a/DStarGateway/DStarGatewayApp.cpp b/DStarGateway/DStarGatewayApp.cpp index a62550b..b2cb51a 100644 --- a/DStarGateway/DStarGatewayApp.cpp +++ b/DStarGateway/DStarGatewayApp.cpp @@ -343,7 +343,7 @@ bool CDStarGatewayApp::createThread() TXLX xlxConfig; m_config->getXLX(xlxConfig); CLog::logInfo("XLX enabled: %d, Hosts file url: %s", int(xlxConfig.enabled), xlxConfig.url.c_str()); - m_thread->setXLX(xlxConfig.enabled, xlxConfig.enabled ? CXLXHostsFileDownloader::download(xlxConfig.url) : ""); + m_thread->setXLX(xlxConfig.enabled, xlxConfig.enabled ? CHostsFileDownloader::download(xlxConfig.url) : ""); // Setup Remote TRemote remoteConfig;