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
Commits
cae0c091
Commit
cae0c091
authored
1 year ago
by
Roman Khlopkov
🔜
Browse files
Options
Downloads
Patches
Plain Diff
[*] Node client states sequence corrected
parent
40b2e8a6
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Pipeline
#35537
passed with stage
in 9 minutes and 35 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
modules/net/dap_chain_node_client.c
+9
-11
9 additions, 11 deletions
modules/net/dap_chain_node_client.c
with
9 additions
and
11 deletions
modules/net/dap_chain_node_client.c
+
9
−
11
View file @
cae0c091
...
...
@@ -253,7 +253,15 @@ static void s_stage_connected_callback(dap_client_t *a_client, void *a_arg)
log_it
(
L_NOTICE
,
"Stream connection with node "
NODE_ADDR_FP_STR
" (%s:%hu) established"
,
NODE_ADDR_FP_ARGS_S
(
l_node_client
->
remote_node_addr
),
l_ip_addr_str
,
l_node_client
->
info
->
hdr
.
ext_port
);
// set callbacks for C and N channels; for R and S it is not needed
if
(
a_client
->
active_channels
)
{
size_t
l_channels_count
=
dap_strlen
(
a_client
->
active_channels
);
for
(
size_t
i
=
0
;
i
<
l_channels_count
;
i
++
)
{
if
(
s_node_client_set_notify_callbacks
(
a_client
,
a_client
->
active_channels
[
i
])
==
-
1
)
{
log_it
(
L_WARNING
,
"No ch_chain channel, can't init notify callback for pkt type CH_CHAIN"
);
}
}
}
if
(
l_node_client
->
callbacks
.
connected
)
l_node_client
->
callbacks
.
connected
(
l_node_client
,
l_node_client
->
callbacks_arg
);
dap_stream_ch_chain_net_pkt_hdr_t
l_announce
=
{
.
version
=
DAP_STREAM_CH_CHAIN_NET_PKT_VERSION
,
...
...
@@ -266,7 +274,6 @@ static void s_stage_connected_callback(dap_client_t *a_client, void *a_arg)
log_it
(
L_DEBUG
,
"Wakeup all who waits"
);
dap_cond_signal
(
l_node_client
->
wait_cond
);
pthread_mutex_unlock
(
&
l_node_client
->
wait_mutex
);
dap_stream_t
*
l_stream
=
dap_client_get_stream
(
a_client
);
if
(
l_stream
)
{
l_node_client
->
esocket_uuid
=
l_stream
->
esocket
->
uuid
;
...
...
@@ -283,15 +290,6 @@ static void s_stage_connected_callback(dap_client_t *a_client, void *a_arg)
}
}
}
// set callbacks for C and N channels; for R and S it is not needed
if
(
a_client
->
active_channels
)
{
size_t
l_channels_count
=
dap_strlen
(
a_client
->
active_channels
);
for
(
size_t
i
=
0
;
i
<
l_channels_count
;
i
++
)
{
if
(
s_node_client_set_notify_callbacks
(
a_client
,
a_client
->
active_channels
[
i
])
==
-
1
)
{
log_it
(
L_WARNING
,
"No ch_chain channel, can't init notify callback for pkt type CH_CHAIN"
);
}
}
}
}
}
...
...
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