Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
cellframe-sdk
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Code
Merge requests
16
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
cellframe
cellframe-sdk
Compare revisions
e85f8701f5a93caca2e714a2ba331b888bbf069d to a79a88a29708cce0ea949a308a872589de928ed2
Compare revisions
Changes are shown as if the
source
revision was being merged into the
target
revision.
Learn more about comparing revisions.
Source
cellframe/cellframe-sdk
Select target project
No results found
a79a88a29708cce0ea949a308a872589de928ed2
Select Git revision
Swap
Target
cellframe/cellframe-sdk
Select target project
cellframe/cellframe-sdk
MIKA83/cellframe-sdk
2 results
e85f8701f5a93caca2e714a2ba331b888bbf069d
Select Git revision
Show changes
Only incoming changes from source
Include changes to target since source was created
Compare
Commits on Source (3)
fixed command tx_history
· e80cace3
alexander.lysikov
authored
4 years ago
e80cace3
Merge branch 'feature-4242' into 'master'
· 8ca6372c
dmitriy.gerasimov
authored
4 years ago
fixed command tx_history See merge request
!140
8ca6372c
[*] fixed node deadlock on channel closing
· a79a88a2
Aleksei Voronin
authored
4 years ago
a79a88a2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
dap-sdk/net/stream/stream/dap_stream.c
+8
-5
8 additions, 5 deletions
dap-sdk/net/stream/stream/dap_stream.c
modules/net/dap_chain_node_cli_cmd_tx.c
+25
-24
25 additions, 24 deletions
modules/net/dap_chain_node_cli_cmd_tx.c
with
33 additions
and
29 deletions
dap-sdk/net/stream/stream/dap_stream.c
View file @
a79a88a2
...
...
@@ -697,12 +697,15 @@ void stream_dap_delete(dap_client_remote_t* sh, void * arg){
}
pthread_mutex_unlock
(
&
s_mutex_keepalive_list
);
pthread_rwlock_wrlock
(
&
l_stream
->
rwlock
);
size_t
i
;
for
(
i
=
0
;
i
<
l_stream
->
channel_count
;
i
++
)
dap_stream_ch_delete
(
l_stream
->
channel
[
i
]);
l_stream
->
channel_count
=
0
;
/* Until channel is closed, it may still need l_stream->rwlock, so we can't lock it here yet.
In case of races on stream closing think about making this place more robust;
or forbid locking l_stream->rwlock from inside of channels. */
for
(
;
l_stream
->
channel_count
;
l_stream
->
channel_count
--
){
dap_stream_ch_delete
(
l_stream
->
channel
[
l_stream
->
channel_count
-
1
]);
l_stream
->
channel
[
l_stream
->
channel_count
-
1
]
=
NULL
;
}
pthread_rwlock_wrlock
(
&
l_stream
->
rwlock
);
if
(
l_stream
->
session
)
dap_stream_session_close
(
l_stream
->
session
->
id
);
l_stream
->
session
=
NULL
;
...
...
This diff is collapsed.
Click to expand it.
modules/net/dap_chain_node_cli_cmd_tx.c
View file @
a79a88a2
...
...
@@ -518,46 +518,47 @@ char* dap_db_history_addr(dap_chain_addr_t * a_addr, dap_chain_t * a_chain)
}
}
char
*
l_dst_to_str
=
(
l_tx_prev_out
)
?
dap_chain_addr_to_str
(
&
l_tx_prev_out
->
addr
)
:
NULL
;
// if use dst addr
bool
l_is_use_dst_addr
=
false
;
if
(
!
memcmp
(
&
l_tx_prev_out
->
addr
,
a_addr
,
sizeof
(
dap_chain_addr_t
)))
l_is_use_dst_addr
=
true
;
l_src_str_is_cur
=
l_is_use_src_addr
;
if
(
l_src_addr
->
len
<=
1
)
{
l_src_str
=
(
l_tx_data
)
?
dap_chain_addr_to_str
(
&
l_tx_data
->
addr
)
:
NULL
;
if
(
!
memcmp
(
&
l_tx_prev_out
->
addr
,
a_addr
,
sizeof
(
dap_chain_addr_t
)))
if
(
l_tx_prev_out
&&
!
memcmp
(
&
l_tx_prev_out
->
addr
,
a_addr
,
sizeof
(
dap_chain_addr_t
)))
l_src_str_is_cur
=
true
;
dap_string_free
(
l_src_addr
,
true
);
}
else
l_src_str
=
dap_string_free
(
l_src_addr
,
false
);
if
(
l_is_use_src_addr
&&
!
l_is_use_dst_addr
)
{
dap_string_append_printf
(
l_str_out
,
"tx hash %s
\n
%s in send %lu %s from %s
\n
to %s
\n
"
,
l_tx_data
->
tx_hash_str
,
l_time_str
?
l_time_str
:
""
,
l_tx_prev_out
->
header
.
value
,
l_tx_data
->
token_ticker
,
l_src_str
?
l_src_str
:
""
,
l_dst_to_str
);
}
else
if
(
l_is_use_dst_addr
&&
!
l_is_use_src_addr
)
{
if
(
!
l_src_str_is_cur
)
if
(
l_tx_prev_out
)
{
char
*
l_dst_to_str
=
dap_chain_addr_to_str
(
&
l_tx_prev_out
->
addr
);
// if use dst addr
bool
l_is_use_dst_addr
=
false
;
if
(
!
memcmp
(
&
l_tx_prev_out
->
addr
,
a_addr
,
sizeof
(
dap_chain_addr_t
)))
l_is_use_dst_addr
=
true
;
if
(
l_is_use_src_addr
&&
!
l_is_use_dst_addr
)
{
dap_string_append_printf
(
l_str_out
,
"tx hash %s
\n
%s in
recv
%lu %s from %s
\n
"
,
"tx hash %s
\n
%s in
send
%lu %s from
%s
\n
to
%s
\n
"
,
l_tx_data
->
tx_hash_str
,
l_time_str
?
l_time_str
:
""
,
l_tx_prev_out
->
header
.
value
,
l_tx_data
->
token_ticker
,
l_src_str
?
l_src_str
:
""
);
}
l_src_str
?
l_src_str
:
""
,
l_dst_to_str
);
}
else
if
(
l_is_use_dst_addr
&&
!
l_is_use_src_addr
)
{
if
(
!
l_src_str_is_cur
)
dap_string_append_printf
(
l_str_out
,
"tx hash %s
\n
%s in recv %lu %s from %s
\n
"
,
l_tx_data
->
tx_hash_str
,
l_time_str
?
l_time_str
:
""
,
l_tx_prev_out
->
header
.
value
,
l_tx_data
->
token_ticker
,
l_src_str
?
l_src_str
:
""
);
}
DAP_DELETE
(
l_dst_to_str
);
DAP_DELETE
(
l_dst_to_str
);
}
dap_list_free
(
l_list_out_prev_items
);
}
...
...
This diff is collapsed.
Click to expand it.