Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
celllframe-node
Manage
Activity
Members
Labels
Plan
Issues
5
Issue boards
Milestones
Code
Merge requests
16
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor 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
cellframe
celllframe-node
Commits
5e3f082a
Commit
5e3f082a
authored
2 years ago
by
Roman Khlopkov
🔜
Browse files
Options
Downloads
Plain Diff
Merge branch 'feature-7149' into 'develop'
feature-7149 See merge request
!725
parents
ac6db6ad
88808148
No related branches found
No related tags found
3 merge requests
!974
bugfix-8996
,
!873
Hotfix 8568
,
!725
feature-7149
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
cellframe-sdk
+1
-1
1 addition, 1 deletion
cellframe-sdk
dap-sdk
+1
-1
1 addition, 1 deletion
dap-sdk
dist/share/configs/cellframe-node.cfg.tpl
+4
-4
4 additions, 4 deletions
dist/share/configs/cellframe-node.cfg.tpl
sources/main.c
+21
-24
21 additions, 24 deletions
sources/main.c
with
27 additions
and
30 deletions
cellframe-sdk
@
76dfceb9
Compare
27e938a8
...
76dfceb9
Subproject commit
27e938a83ee079b2cb60ffd6cd47a2364521d821
Subproject commit
76dfceb9c02f6d4fbaf97a47aa10cd8828c01c70
This diff is collapsed.
Click to expand it.
dap-sdk
@
0e4afb7d
Compare
70151d1c
...
0e4afb7d
Subproject commit
70151d1c362d4e9669358991c5ac70ad24e33a9a
Subproject commit
0e4afb7d1c40040641ccee1be2d246e856740b23
This diff is collapsed.
Click to expand it.
dist/share/configs/cellframe-node.cfg.tpl
+
4
−
4
View file @
5e3f082a
...
@@ -48,10 +48,10 @@ listen_port={NOTIFY_SRV_PORT}
...
@@ -48,10 +48,10 @@ listen_port={NOTIFY_SRV_PORT}
[dns_client]
[dns_client]
#request_timeout=10
#request_timeout=10
# B
uiltin DNS
server
# B
ootstrap balancer
server
[
dns_serv
er]
[
bootstrap_balanc
er]
#enabled
=false
dns_server
=false
#bootstrap_balanc
er=false
http_serv
er=false
# Ledger defaults
# Ledger defaults
[ledger]
[ledger]
...
...
This diff is collapsed.
Click to expand it.
sources/main.c
+
21
−
24
View file @
5e3f082a
...
@@ -62,6 +62,7 @@
...
@@ -62,6 +62,7 @@
#include
"dap_http_folder.h"
#include
"dap_http_folder.h"
#include
"dap_chain_node_dns_client.h"
#include
"dap_chain_node_dns_client.h"
#include
"dap_chain_node_dns_server.h"
#include
"dap_chain_node_dns_server.h"
#include
"dap_chain_net_balancer.h"
#ifdef DAP_MODULES_DYNAMIC
#ifdef DAP_MODULES_DYNAMIC
#include
"dap_modules_dynamic_cdb.h"
#include
"dap_modules_dynamic_cdb.h"
...
@@ -130,11 +131,6 @@
...
@@ -130,11 +131,6 @@
#include
"dap_plugins_python_app_context.h"
#include
"dap_plugins_python_app_context.h"
#endif
#endif
#define ENC_HTTP_URL "/enc_init"
#define STREAM_CTL_URL "/stream_ctl"
#define STREAM_URL "/stream"
#define MEMPOOL_URL "/mempool"
#define MEMPOOL_URL "/mempool"
#define MAIN_URL "/"
#define MAIN_URL "/"
...
@@ -418,6 +414,8 @@ int main( int argc, const char **argv )
...
@@ -418,6 +414,8 @@ int main( int argc, const char **argv )
}
}
#endif
#endif
dap_chain_net_load_all
();
log_it
(
L_INFO
,
"Automatic mempool processing %s"
,
log_it
(
L_INFO
,
"Automatic mempool processing %s"
,
dap_chain_node_mempool_autoproc_init
()
?
"enabled"
:
"disabled"
);
dap_chain_node_mempool_autoproc_init
()
?
"enabled"
:
"disabled"
);
...
@@ -453,11 +451,11 @@ int main( int argc, const char **argv )
...
@@ -453,11 +451,11 @@ int main( int argc, const char **argv )
#endif
#endif
// Handshake URL
// Handshake URL
enc_http_add_proc
(
DAP_HTTP
(
l_server
),
ENC_HTTP_URL
);
enc_http_add_proc
(
DAP_HTTP
(
l_server
),
"/"
DAP_UPLINK_PATH_ENC_INIT
);
// Streaming URLs
// Streaming URLs
dap_stream_add_proc_http
(
DAP_HTTP
(
l_server
),
STREAM
_URL
);
dap_stream_add_proc_http
(
DAP_HTTP
(
l_server
),
"/"
DAP_UPLINK_PATH_
STREAM
);
dap_stream_ctl_add_proc
(
DAP_HTTP
(
l_server
),
STREAM_CTL
_URL
);
dap_stream_ctl_add_proc
(
DAP_HTTP
(
l_server
),
"/"
DAP_UPLINK_PATH_
STREAM_CTL
);
const
char
*
str_start_mempool
=
dap_config_get_item_str
(
g_config
,
"mempool"
,
"accept"
);
const
char
*
str_start_mempool
=
dap_config_get_item_str
(
g_config
,
"mempool"
,
"accept"
);
if
(
str_start_mempool
&&
!
strcmp
(
str_start_mempool
,
"true"
))
{
if
(
str_start_mempool
&&
!
strcmp
(
str_start_mempool
,
"true"
))
{
...
@@ -477,30 +475,29 @@ int main( int argc, const char **argv )
...
@@ -477,30 +475,29 @@ int main( int argc, const char **argv )
}
else
}
else
log_it
(
L_INFO
,
"No enabled server, working in client mode only"
);
log_it
(
L_INFO
,
"No enabled server, working in client mode only"
);
if
(
dap_config_get_item_bool_default
(
g_config
,
"dns_server"
,
"enabled"
,
false
))
bool
dns_bootstrap_balancer_enabled
=
dap_config_get_item_bool_default
(
g_config
,
"bootstrap_balancer"
,
"dns_server"
,
false
);
{
log_it
(
L_DEBUG
,
"config bootstrap_balancer->dns_server =
\"
%u
\"
"
,
dns_bootstrap_balancer_enabled
);
if
(
dns_bootstrap_balancer_enabled
)
{
// DNS server start
// DNS server start
bool
bootstrap_balancer_enabled
=
dap_config_get_item_bool_default
(
g_config
,
"dns_server"
,
"bootstrap_balancer"
,
false
);
dap_dns_server_start
(
dap_config_get_item_uint16_default
(
g_config
,
"bootstrap_balancer"
,
"dns_listen_port"
,
DNS_LISTEN_PORT
));
log_it
(
L_DEBUG
,
"config dns_server->bootstrap_balancer =
\"
%u
\"
"
,
bootstrap_balancer_enabled
);
}
if
(
bootstrap_balancer_enabled
)
{
bool
http_bootstrap_balancer_enabled
=
dap_config_get_item_bool_default
(
g_config
,
"bootstrap_balancer"
,
"http_server"
,
false
);
dap_dns_server_start
(
dap_config_get_item_uint16_default
(
g_config
,
"dns_server"
,
"bootstrap_balancer_port"
,
DNS_LISTEN_PORT
));
log_it
(
L_DEBUG
,
"config bootstrap_balancer->http_server =
\"
%u
\"
"
,
http_bootstrap_balancer_enabled
);
}
if
(
http_bootstrap_balancer_enabled
)
{
// HTTP URL add
dap_http_simple_proc_add
(
DAP_HTTP
(
l_server
),
"/"
DAP_UPLINK_PATH_BALANCER
,
1024
,
dap_chain_net_balancer_http_issue_link
);
}
}
//dap_chain_net_load_all();
if
(
dap_config_get_item_bool_default
(
g_config
,
"plugins"
,
"enabled"
,
false
)){
if
(
dap_config_get_item_bool_default
(
g_config
,
"plugins"
,
"enabled"
,
false
)){
char
*
l_plugins_path_default
=
dap_strdup_printf
(
"%s/var/lib/plugins"
,
g_sys_dir_path
);
char
*
l_plugins_path_default
=
dap_strdup_printf
(
"%s/var/lib/plugins"
,
g_sys_dir_path
);
dap_plugin_init
(
dap_config_get_item_str_default
(
g_config
,
"plugins"
,
"path"
,
l_plugins_path_default
)
);
dap_plugin_init
(
dap_config_get_item_str_default
(
g_config
,
"plugins"
,
"path"
,
l_plugins_path_default
)
);
DAP_DELETE
(
l_plugins_path_default
);
DAP_DELETE
(
l_plugins_path_default
);
#ifdef DAP_SUPPORT_PYTHON_PLUGINS
//Init python plugins
//Init python plugins
#ifdef DAP_SUPPORT_PYTHON_PLUGINS
log_it
(
L_NOTICE
,
"Loading python plugins"
);
log_it
(
L_NOTICE
,
"Loading python plugins"
);
dap_plugins_python_app_content_init
(
l_server
);
dap_plugins_python_app_content_init
(
l_server
);
dap_chain_plugins_init
(
g_config
);
dap_chain_plugins_init
(
g_config
);
#endif
#endif
dap_plugin_start_all
();
dap_plugin_start_all
();
}
}
...
...
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