Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
dap-sdk
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
7
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
dap
dap-sdk
Merge requests
!428
Notifies fixed
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Notifies fixed
hotfix-notify-sock
into
master
Overview
0
Commits
1
Pipelines
1
Changes
1
Merged
Constantin P.
requested to merge
hotfix-notify-sock
into
master
5 months ago
Overview
0
Commits
1
Pipelines
1
Changes
1
Expand
👍
0
👎
0
Merge request reports
Compare
master
master (base)
and
latest version
latest version
6c424269
1 commit,
5 months ago
1 file
+
9
−
13
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
net/server/notify_server/src/dap_notify_srv.c
+
9
−
13
Options
@@ -205,28 +205,24 @@ int dap_notify_server_send_f_mt(const char *a_format, ...)
*/
static
void
s_notify_server_callback_queue
(
dap_events_socket_t
*
a_es
,
void
*
a_arg
)
{
size_t
l_str_len
=
a_arg
?
strlen
((
char
*
)
a_arg
)
:
0
;
if
(
!
l_str_len
)
return
;
pthread_rwlock_rdlock
(
&
s_notify_server_clients_mutex
);
dap_events_socket_handler_hh_t
*
l_socket_handler
=
NULL
,
*
l_tmp
=
NULL
;
HASH_ITER
(
hh
,
s_notify_server_clients
,
l_socket_handler
,
l_tmp
){
HASH_ITER
(
hh
,
s_notify_server_clients
,
l_socket_handler
,
l_tmp
)
{
uint32_t
l_worker_id
=
l_socket_handler
->
worker_id
;
if
(
l_worker_id
>=
dap_events_thread_get_count
()
)
{
if
(
l_worker_id
>=
dap_events_thread_get_count
()
)
{
log_it
(
L_ERROR
,
"Wrong worker id %u for send_inter() function"
,
l_worker_id
);
continue
;
}
size_t
l_str_len
=
a_arg
?
strlen
((
char
*
)
a_arg
)
:
0
;
if
(
l_str_len
){
#ifdef DAP_EVENTS_CAPS_IOCP
dap_events_socket_write_mt
(
dap_events_worker_get
(
l_worker_id
),
l_socket_handler
->
uuid
,
a_arg
,
l_str_len
+
1
);
#else
dap_events_socket_write_inter
(
a_es
->
worker
->
queue_es_io_input
[
l_worker_id
],
l_socket_handler
->
uuid
,
a_arg
,
l_str_len
+
1
);
#endif
}
dap_events_socket_write_mt
(
dap_events_worker_get
(
l_worker_id
),
l_socket_handler
->
uuid
,
a_arg
,
l_str_len
+
1
);
}
pthread_rwlock_unlock
(
&
s_notify_server_clients_mutex
);
#ifdef DAP_EVENTS_CAPS_IOCP
DAP_DELETE
(
a_arg
);
#endif
}
/**
Loading