summaryrefslogtreecommitdiff
path: root/server/src/main.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'server/src/main.cpp')
-rw-r--r--server/src/main.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/server/src/main.cpp b/server/src/main.cpp
index b856fd4..09b0b62 100644
--- a/server/src/main.cpp
+++ b/server/src/main.cpp
@@ -32,6 +32,7 @@
#include "main.h"
#include "config.h"
#include "client.h"
+#include "download_internal.h"
core_api *module_api = nullptr;
@@ -44,6 +45,8 @@ std::map<std::string, client*> clients; //auth token used for key
runtime_config_s runtime_config;
+std::map<int, download_internal_s> downloads;
+
server *serv = nullptr;
@@ -212,6 +215,7 @@ extern "C" int main(int argc, char *argv[])
return -1;
}
modules->on_modules_loaded(); //call second initialization stage in modules
+ modules->sync_downloads(downloads);
if(daemon)
{
@@ -220,7 +224,7 @@ extern "C" int main(int argc, char *argv[])
boost::asio::io_service io_service_server;
try{
//TODO: server options ip address, interface name
- serv = new server(io_service_server, runtime_config, clients, runtime_config.config_file.get<int>("server.port", 6613));
+ serv = new server(io_service_server, runtime_config, clients, downloads, runtime_config.config_file.get<int>("server.port", 6613));
}
catch(std::exception &e)
{