Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
L
libdap-chain-net
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
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
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
cellframe
libdap-chain-net
Commits
e7097a14
Commit
e7097a14
authored
5 years ago
by
dmitriy.gerasimov
Browse files
Options
Downloads
Patches
Plain Diff
[*] renamed remote_set to cur_node_set_from_remote
parent
2b1ce65b
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
dap_chain_node_cli.c
+1
-1
1 addition, 1 deletion
dap_chain_node_cli.c
dap_chain_node_cli_cmd.c
+5
-5
5 additions, 5 deletions
dap_chain_node_cli_cmd.c
with
6 additions
and
6 deletions
dap_chain_node_cli.c
+
1
−
1
View file @
e7097a14
...
@@ -461,7 +461,7 @@ int dap_chain_node_cli_init(dap_config_t * g_config)
...
@@ -461,7 +461,7 @@ int dap_chain_node_cli_init(dap_config_t * g_config)
"global_db node dump -net <net name> -addr <node address> | -alias <node alias>
\n\n
"
"global_db node dump -net <net name> -addr <node address> | -alias <node alias>
\n\n
"
"global_db node cur_node get -net <net name>
\n\n
"
"global_db node cur_node get -net <net name>
\n\n
"
"global_db node cur_node_set -net <net name> -addr <node address> | -alias <node alias>
\n\n
"
"global_db node cur_node_set -net <net name> -addr <node address> | -alias <node alias>
\n\n
"
"global_db node remote
_set
-addr <node address> | -alias <node alias>
\n
"
);
"global_db node
cur_node_set_from_
remote -addr <node address> | -alias <node alias>
\n
"
);
dap_chain_node_cli_cmd_item_create
(
"node"
,
com_node
,
"Work with node"
,
dap_chain_node_cli_cmd_item_create
(
"node"
,
com_node
,
"Work with node"
,
"node alias {<node address> | -alias <node alias>}
\n\n
"
"node alias {<node address> | -alias <node alias>}
\n\n
"
"node connect {<node address> | -alias <node alias>}
\n\n
"
"node connect {<node address> | -alias <node alias>}
\n\n
"
...
...
This diff is collapsed.
Click to expand it.
dap_chain_node_cli_cmd.c
+
5
−
5
View file @
e7097a14
...
@@ -594,7 +594,7 @@ static int com_global_db_cur_node_set(dap_chain_node_info_t *a_node_info, const
...
@@ -594,7 +594,7 @@ static int com_global_db_cur_node_set(dap_chain_node_info_t *a_node_info, const
* str_reply[out] for reply
* str_reply[out] for reply
* return 0 Ok, -1 error
* return 0 Ok, -1 error
*/
*/
static
int
com_global_db_
set
_remote
(
dap_chain_node_info_t
*
a_node_info
,
const
char
*
a_alias_str
,
char
**
a_str_reply
)
static
int
com_global_db_
cur_node_set_from
_remote
(
dap_chain_node_info_t
*
a_node_info
,
const
char
*
a_alias_str
,
char
**
a_str_reply
)
{
{
if
(
!
a_node_info
->
hdr
.
address
.
uint64
&&
!
a_alias_str
)
{
if
(
!
a_node_info
->
hdr
.
address
.
uint64
&&
!
a_alias_str
)
{
dap_chain_node_cli_set_reply_text
(
a_str_reply
,
"addr not found"
);
dap_chain_node_cli_set_reply_text
(
a_str_reply
,
"addr not found"
);
...
@@ -694,7 +694,7 @@ static int com_global_db_set_remote(dap_chain_node_info_t *a_node_info, const ch
...
@@ -694,7 +694,7 @@ static int com_global_db_set_remote(dap_chain_node_info_t *a_node_info, const ch
int
com_global_db
(
int
argc
,
const
char
**
argv
,
char
**
str_reply
)
int
com_global_db
(
int
argc
,
const
char
**
argv
,
char
**
str_reply
)
{
{
enum
{
enum
{
CMD_NONE
,
CMD_ADD
,
CMD_DEL
,
CMD_LINK
,
CMD_DUMP
,
CMD_CUR_NODE_GET
,
CMD_CUR_NODE_SET
,
CMD_REMOTE
_SET
CMD_NONE
,
CMD_ADD
,
CMD_DEL
,
CMD_LINK
,
CMD_DUMP
,
CMD_CUR_NODE_GET
,
CMD_CUR_NODE_SET
,
CMD_
CUR_NODE_SET_FROM_
REMOTE
};
};
//printf("com_global_db\n");
//printf("com_global_db\n");
int
arg_index
=
1
;
int
arg_index
=
1
;
...
@@ -731,7 +731,7 @@ int com_global_db(int argc, const char ** argv, char **str_reply)
...
@@ -731,7 +731,7 @@ int com_global_db(int argc, const char ** argv, char **str_reply)
}
}
else
if
((
arg_index_n
=
dap_chain_node_cli_find_option_val
(
argv
,
arg_index
,
min
(
argc
,
arg_index
+
1
),
"remote_set"
,
else
if
((
arg_index_n
=
dap_chain_node_cli_find_option_val
(
argv
,
arg_index
,
min
(
argc
,
arg_index
+
1
),
"remote_set"
,
NULL
))
!=
0
)
{
NULL
))
!=
0
)
{
cmd_num
=
CMD_REMOTE
_SET
;
cmd_num
=
CMD_
CUR_NODE_SET_FROM_
REMOTE
;
}
}
if
(
cmd_num
==
CMD_NONE
)
{
if
(
cmd_num
==
CMD_NONE
)
{
dap_chain_node_cli_set_reply_text
(
str_reply
,
"command %s not recognized"
,
argv
[
1
]);
dap_chain_node_cli_set_reply_text
(
str_reply
,
"command %s not recognized"
,
argv
[
1
]);
...
@@ -803,9 +803,9 @@ int com_global_db(int argc, const char ** argv, char **str_reply)
...
@@ -803,9 +803,9 @@ int com_global_db(int argc, const char ** argv, char **str_reply)
case
CMD_CUR_NODE_SET
:
case
CMD_CUR_NODE_SET
:
// handler of command 'global_db cur_node set'
// handler of command 'global_db cur_node set'
return
com_global_db_cur_node_set
(
l_node_info
,
alias_str
,
str_reply
);
return
com_global_db_cur_node_set
(
l_node_info
,
alias_str
,
str_reply
);
case
CMD_REMOTE
_SET
:
case
CMD_
CUR_NODE_SET_FROM_
REMOTE
:
// handler of command 'global_db node remote_set'
// handler of command 'global_db node remote_set'
return
com_global_db_
set
_remote
(
l_node_info
,
alias_str
,
str_reply
);
return
com_global_db_
cur_node_set_from
_remote
(
l_node_info
,
alias_str
,
str_reply
);
default:
default:
dap_chain_node_cli_set_reply_text
(
str_reply
,
"command %s not recognized"
,
argv
[
1
]);
dap_chain_node_cli_set_reply_text
(
str_reply
,
"command %s not recognized"
,
argv
[
1
]);
...
...
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