From 408ec2e642217189539654d09ce3877334cffd89 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Al=D0=B5x=D0=B0nder=20Lysik=D0=BEv?= <alexander.lysikov@demlabs.net> Date: Thu, 7 May 2020 15:26:14 +0500 Subject: [PATCH] added news URL support --- CMakeLists.txt | 2 +- sources/main.c | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 292ab4247..b4c891f04 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -8,7 +8,7 @@ set(CMAKE_C_STANDARD 11) SET( CPACK_PACKAGE_NAME "${PROJECT_NAME}") SET( CPACK_PACKAGE_VERSION_MAJOR 3) SET( CPACK_PACKAGE_VERSION_MINOR 2) -SET( CPACK_PACKAGE_VERSION_PATCH 10) +SET( CPACK_PACKAGE_VERSION_PATCH 11) # init CellFrame SDK add_definitions("-DDAP_VERSION=\"${CPACK_PACKAGE_VERSION_MAJOR}\"") diff --git a/sources/main.c b/sources/main.c index 3b555e8cf..9b91d3852 100755 --- a/sources/main.c +++ b/sources/main.c @@ -80,6 +80,7 @@ #include "dap_chain_net_srv_app_db.h" #include "dap_chain_net_srv_datum.h" #include "dap_chain_net_bugreport.h" +#include "dap_chain_net_news.h" #ifdef DAP_OS_LINUX #include "dap_chain_net_srv_vpn.h" @@ -408,6 +409,12 @@ int main( int argc, const char **argv ) dap_chain_net_bugreport_add_proc(DAP_HTTP(l_server)); } + // News URLs + bool l_news_url_enabled = dap_config_get_item_bool_default(g_config, "server", "l_news_url_enabled", false); + if(l_news_url_enabled) { + dap_chain_net_news_add_proc(DAP_HTTP(l_server)); + } + const char *str_start_mempool = dap_config_get_item_str( g_config, "mempool", "accept" ); if ( str_start_mempool && !strcmp(str_start_mempool, "true")) { dap_chain_mempool_add_proc(DAP_HTTP(l_server), MEMPOOL_URL); -- GitLab