Skip to content
Snippets Groups Projects
Commit 8fd2d78a authored by dmitriy.gerasimov's avatar dmitriy.gerasimov
Browse files

[!] 4.4 release

parent c9d74f80
No related branches found
No related tags found
1 merge request!41features-4787
Pipeline #8006 failed with stages
in 35 seconds
......@@ -22,9 +22,9 @@ add_subdirectory(3rdparty/libmdbx)
endif()
if (WIN32)
set(CELLFRAME_MODULES "core chains mining network srv cs-blocks cs-dag-poa cs-block-poa cs-dag-pos cs-none srv-app srv-app-db srv-datum srv-stake srv-xchange modules-dynamic")
set(CELLFRAME_MODULES "core chains mining network srv cs-blocks cs-dag-poa cs-block-poa cs-dag-pos cs-none srv-app srv-app-db srv-datum srv-stake srv-xchange")
elseif(BSD)
set(CELLFRAME_MODULES "core chains mining network srv cs-blocks cs-dag-poa cs-block-poa cs-dag-pos cs-none srv-app srv-app-db srv-datum srv-stake srv-xchange modules-dynamic")
set(CELLFRAME_MODULES "core chains mining network srv cs-blocks cs-dag-poa cs-block-poa cs-dag-pos cs-none srv-app srv-app-db srv-datum srv-stake srv-xchange")
elseif(ANDROID)
set(CELLFRAME_MODULES "core chains mining network srv cs-blocks cs-dag-poa cs-block-poa cs-dag-pos cs-none srv-app srv-app-db srv-datum srv-stake srv-xchange")
elseif(LINUX)
......
......@@ -61,7 +61,9 @@
#include "dap_notify_srv.h"
#include "dap_chain_node_dns_client.h"
#include "dap_chain_node_dns_server.h"
#ifdef DAP_MODULES_DYNAMIC
#include "dap_modules_dynamic_cdb.h"
#endif
#include "dap_events.h"
......@@ -435,6 +437,7 @@ int main( int argc, const char **argv )
// Init HTTP-specific values
dap_http_new( l_server, dap_get_appname() );
#ifdef DAP_MODULES_DYNAMIC
if( dap_config_get_item_bool_default(g_config,"cdb","enabled",false) ) {
if(dap_modules_dynamic_load_cdb(DAP_HTTP( l_server ))){
log_it(L_CRITICAL,"Can't init CDB module");
......@@ -443,6 +446,7 @@ int main( int argc, const char **argv )
log_it(L_NOTICE, "Central DataBase (CDB) is initialized");
}
}
#endif
// Handshake URL
enc_http_add_proc( DAP_HTTP(l_server), ENC_HTTP_URL );
......@@ -514,6 +518,10 @@ int main( int argc, const char **argv )
dap_chain_net_srv_xchange_deinit();
dap_chain_net_srv_stake_deinit();
dap_chain_net_deinit();
#ifdef DAP_MODULES_DYNAMIC
dap_modules_dynamic_close_cdb();
#endif
dap_chain_global_db_deinit();
dap_chain_deinit();
dap_config_close( g_config );
......
#include <signal.h>
#include <stdio.h>
#include <string.h>
#include <unistd.h>
#include "dap_common.h"
#include "dap_events.h"
#include "dap_chain_global_db.h"
//#include "dap_chain_plugins.h"
#include "dap_chain_node.h"
#include "dap_chain_net_srv_xchange.h"
#include "dap_chain_net_srv_stake.h"
#include "dap_chain.h"
#include "dap_stream.h"
#include "dap_stream_ctl.h"
#include "dap_enc_ks.h"
#include "dap_enc_http.h"
#include "dap_http.h"
#include "dap_chain_node_dns_server.h"
#include "sig_unix_handler.h"
#ifdef DAP_MODULES_DYNAMIC
#include "dap_modules_dynamic_cdb.h"
#endif
#define LOG_TAG "sig_unix_handler"
......@@ -22,12 +35,12 @@ static void clear_pid_file() {
static void sig_exit_handler(int sig_code) {
log_it(L_DEBUG, "Got exit code: %d", sig_code);
clear_pid_file();
//#ifdef DAP_SUPPORT_PYTHON_PLUGINS
// dap_chain_plugins_deinit();
//#endif
#ifdef DAP_SUPPORT_PYTHON_PLUGINS
dap_chain_plugins_deinit();
#endif
dap_chain_node_mempool_autoproc_deinit();
dap_chain_net_srv_xchange_deinit();
dap_chain_net_srv_stake_deinit();
......@@ -39,6 +52,9 @@ static void sig_exit_handler(int sig_code) {
dap_enc_ks_deinit();
enc_http_deinit();
dap_http_deinit();
#ifdef DAP_MODULES_DYNAMIC
dap_modules_dynamic_close_cdb();
#endif
dap_dns_server_stop();
dap_server_deinit();
dap_events_stop_all();
......@@ -46,8 +62,8 @@ static void sig_exit_handler(int sig_code) {
dap_config_close( g_config );
dap_common_deinit();
//log_it(L_NOTICE,"Stopped Cellframe Node");
//fflush(stdout);
log_it(L_NOTICE,"Stopped Cellframe Node");
fflush(stdout);
exit(0);
}
......@@ -76,7 +92,7 @@ int sig_unix_handler_deinit() {
//log_it(L_DEBUG, "Deinit");
if( s_pid_path )
DAP_DELETE(s_pid_path);
DAP_DELETE((void *)s_pid_path);
signal(SIGTERM, SIG_DFL);
signal(SIGINT, SIG_DFL);
......@@ -86,3 +102,4 @@ int sig_unix_handler_deinit() {
return 0;
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment