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
18
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
Commits
678aef3d
"git@gitlab.demlabs.net:cellframe/libdap-chain-crypto.git" did not exist on "d962d08c3fdd36d5dfeb32eb85af9d35033c3f36"
Commit
678aef3d
authored
8 months ago
by
Roman Khlopkov
🔜
Browse files
Options
Downloads
Patches
Plain Diff
[*] Validator check antifreeze
parent
899deb40
No related branches found
No related tags found
No related merge requests found
Pipeline
#43540
passed with stage
in 12 minutes and 12 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
modules/net/dap_chain_node_client.c
+15
-15
15 additions, 15 deletions
modules/net/dap_chain_node_client.c
with
15 additions
and
15 deletions
modules/net/dap_chain_node_client.c
+
15
−
15
View file @
678aef3d
...
@@ -395,28 +395,28 @@ int dap_chain_node_client_wait(dap_chain_node_client_t *a_client, int a_waited_s
...
@@ -395,28 +395,28 @@ int dap_chain_node_client_wait(dap_chain_node_client_t *a_client, int a_waited_s
return
-
2
;
return
-
2
;
}
}
// prepare for signal waiting
struct
timespec
l_cond_timeout
;
clock_gettime
(
CLOCK_REALTIME
,
&
l_cond_timeout
);
l_cond_timeout
.
tv_sec
+=
a_timeout_ms
;
//1000;
// signal waiting
// signal waiting
dap_chain_node_client_state_t
l_clinet_state
=
a_client
->
state
;
while
(
a_client
->
state
!=
a_waited_state
)
{
while
(
a_client
->
state
==
l_clinet_state
)
{
// prepare for signal waiting
struct
timespec
l_cond_timeout
;
clock_gettime
(
CLOCK_REALTIME
,
&
l_cond_timeout
);
l_cond_timeout
.
tv_sec
+=
a_timeout_ms
;
int
l_ret_wait
=
pthread_cond_timedwait
(
&
a_client
->
wait_cond
,
&
a_client
->
wait_mutex
,
&
l_cond_timeout
);
int
l_ret_wait
=
pthread_cond_timedwait
(
&
a_client
->
wait_cond
,
&
a_client
->
wait_mutex
,
&
l_cond_timeout
);
if
(
l_ret_wait
==
0
&&
(
if
(
l_ret_wait
==
0
)
{
a_client
->
state
==
a_waited_state
||
if
(
a_client
->
state
!=
a_waited_state
)
{
(
a_client
->
state
==
NODE_CLIENT_STATE_ERROR
||
a_client
->
state
==
NODE_CLIENT_STATE_DISCONNECTED
))
if
(
a_client
->
state
==
NODE_CLIENT_STATE_CONNECTING
)
)
{
continue
;
// Spurious wakeup?
assert
(
a_client
->
state
==
NODE_CLIENT_STATE_DISCONNECTED
||
a_client
->
state
==
NODE_CLIENT_STATE_ERROR
);
}
ret
=
a_client
->
state
==
a_waited_state
?
0
:
-
2
;
ret
=
a_client
->
state
==
a_waited_state
?
0
:
-
2
;
break
;
}
else
if
(
l_ret_wait
==
ETIMEDOUT
)
{
// 110 260
}
else
if
(
l_ret_wait
==
ETIMEDOUT
)
{
// 110 260
log_it
(
L_NOTICE
,
"Wait for status is stopped by timeout"
);
log_it
(
L_NOTICE
,
"Wait for status is stopped by timeout"
);
ret
=
-
1
;
ret
=
-
1
;
break
;
}
else
if
(
l_ret_wait
!=
0
)
{
}
else
if
(
l_ret_wait
!=
0
){
log_it
(
L_CRITICAL
,
"pthread_cond_timedwait() error %d:
\"
%s
\"
"
,
l_ret_wait
,
dap_strerror
(
l_ret_wait
));
log_it
(
L_CRITICAL
,
"pthread_cond_timedwait() error %d:
\"
%s
\"
"
,
l_ret_wait
,
dap_strerror
(
l_ret_wait
));
ret
=
-
4
;
}
}
break
;
}
}
pthread_mutex_unlock
(
&
a_client
->
wait_mutex
);
pthread_mutex_unlock
(
&
a_client
->
wait_mutex
);
return
ret
;
return
ret
;
...
...
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