remove some redundant code

This commit is contained in:
cy33hc
2026-05-30 21:31:02 -07:00
parent 38cd9a6e81
commit 65dceb8c25
3 changed files with 10 additions and 21 deletions
+1
View File
@@ -50,6 +50,7 @@ int NfsClient::Connect(const std::string &url, const std::string &user, const st
nfs = nullptr;
return 0;
}
nfs_destroy_url(nfsurl);
connected = true;
+3 -4
View File
@@ -11,7 +11,7 @@
#include "server/http_server.h"
#include "config.h"
#include "util.h"
#include "dbglogger.h"
// #include "dbglogger.h"
extern "C"
{
@@ -65,7 +65,6 @@ static void NetTerm(void)
static void OnSignal()
{
dbglogger_log("Terminating OnSignal");
HttpServer::Stop();
HttpServer::StopDownloadThread();
}
@@ -78,8 +77,8 @@ int main(int argc, char *argv[])
return -1;
}
dbglogger_init();
dbglogger_log("If you see this you've set up dbglogger correctly.");
// dbglogger_init();
// dbglogger_log("If you see this you've set up dbglogger correctly.");
CONFIG::LoadPackageInstallHostData();
CONFIG::LoadBgDownloadData();
+6 -17
View File
@@ -128,23 +128,7 @@ namespace HttpServer
{
tmp_client = new ArchiveOrgClient();
}
else if (host_info->http_server_type.compare(HTTP_SERVER_APACHE))
{
tmp_client = new BaseClient();
}
else if (host_info->http_server_type.compare(HTTP_SERVER_MS_IIS))
{
tmp_client = new BaseClient();
}
else if (host_info->http_server_type.compare(HTTP_SERVER_NGINX))
{
tmp_client = new BaseClient();
}
else if (host_info->http_server_type.compare(HTTP_SERVER_RCLONE))
{
tmp_client = new BaseClient();
}
else if (host_info->http_server_type.compare(HTTP_SERVER_NPX_SERVE))
else
{
tmp_client = new BaseClient();
}
@@ -201,6 +185,11 @@ namespace HttpServer
if (bg_download_list[i].state == STATE_PENDING)
{
RemoteClient *tmp_client = GetRemoteClient(&(bg_download_list[i].host_info));
if (tmp_client == nullptr)
{
break;
}
g_bytes_transfered = &(bg_download_list[i].bytes_transfered);
if (bg_download_list[i].host_info.type == CLIENT_TYPE_FTP)
{