Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
dapcash-node
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
1
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
DapCash
dapcash-node
Commits
8fd2d78a
Commit
8fd2d78a
authored
3 years ago
by
dmitriy.gerasimov
Browse files
Options
Downloads
Patches
Plain Diff
[!] 4.4 release
parent
c9d74f80
No related branches found
Branches containing commit
No related tags found
1 merge request
!41
features-4787
Pipeline
#8006
failed with stages
in 35 seconds
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
CMakeLists.txt
+2
-2
2 additions, 2 deletions
CMakeLists.txt
sources/main.c
+8
-0
8 additions, 0 deletions
sources/main.c
sources/sig_unix_handler.c
+26
-9
26 additions, 9 deletions
sources/sig_unix_handler.c
with
36 additions
and
11 deletions
CMakeLists.txt
+
2
−
2
View file @
8fd2d78a
...
...
@@ -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
)
...
...
This diff is collapsed.
Click to expand it.
sources/main.c
+
8
−
0
View file @
8fd2d78a
...
...
@@ -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
);
...
...
This diff is collapsed.
Click to expand it.
sources/sig_unix_handler.c
+
26
−
9
View file @
8fd2d78a
#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
;
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment