summaryrefslogtreecommitdiff
path: root/server/src/main.cpp
diff options
context:
space:
mode:
authorGluzskiy Alexandr <sss@sss.chaoslab.ru>2015-08-31 20:45:06 +0300
committerGluzskiy Alexandr <sss@sss.chaoslab.ru>2015-08-31 20:45:06 +0300
commit4b4002115d6c7b5c5113d1e2e6e9025565e1c9bb (patch)
tree4e4ecc6d26052bb5f50acd0c1a9260aceb5479fd /server/src/main.cpp
parent12eba4d75931c5e48dac70b1a7dbad7861d059df (diff)
protocol:
download struct must have module_name field server: core: implemented SERVER_DOWNLOADS_LIST_REPLY (draft) added global downloads list client: using std::string instead of QString to avoid unnecessary conversions
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)
{