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
f12d65d8
Commit
f12d65d8
authored
4 years ago
by
Sergei Rashitov
Browse files
Options
Downloads
Patches
Plain Diff
Server Loop logic
[*] Fix error message [*] Fix goto statement [*] Fix server pointer check
parent
24572035
No related branches found
No related tags found
1 merge request
!71
Bugs 3903
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
dap-sdk/net/core/dap_server.c
+4
-3
4 additions, 3 deletions
dap-sdk/net/core/dap_server.c
with
4 additions
and
3 deletions
dap-sdk/net/core/dap_server.c
+
4
−
3
View file @
f12d65d8
...
@@ -85,6 +85,7 @@ static struct epoll_event *threads_epoll_events = NULL;
...
@@ -85,6 +85,7 @@ static struct epoll_event *threads_epoll_events = NULL;
static
dap_server_t
*
_current_run_server
=
NULL
;
static
dap_server_t
*
_current_run_server
=
NULL
;
static
void
read_write_cb
(
dap_client_remote_t
*
dap_cur
,
int32_t
revents
);
static
void
read_write_cb
(
dap_client_remote_t
*
dap_cur
,
int32_t
revents
);
void
*
thread_loop
(
void
*
arg
);
dap_server_thread_t
dap_server_threads
[
DAP_MAX_THREADS
];
dap_server_thread_t
dap_server_threads
[
DAP_MAX_THREADS
];
...
@@ -178,8 +179,8 @@ int32_t dap_server_init( uint32_t count_threads )
...
@@ -178,8 +179,8 @@ int32_t dap_server_init( uint32_t count_threads )
EPOLL_HANDLE
efd
=
epoll_create1
(
0
);
EPOLL_HANDLE
efd
=
epoll_create1
(
0
);
if
(
(
intptr_t
)
efd
==
-
1
)
{
if
(
(
intptr_t
)
efd
==
-
1
)
{
log_it
(
L_ERROR
,
"
Server wakeup no events / error
"
);
log_it
(
L_ERROR
,
"
Can't create epoll instance
"
);
goto
err
or
;
goto
err
;
}
}
dap_server_threads
[
i
].
epoll_fd
=
efd
;
dap_server_threads
[
i
].
epoll_fd
=
efd
;
dap_server_threads
[
i
].
thread_num
=
i
;
dap_server_threads
[
i
].
thread_num
=
i
;
...
@@ -767,7 +768,7 @@ int32_t dap_server_loop( dap_server_t *d_server )
...
@@ -767,7 +768,7 @@ int32_t dap_server_loop( dap_server_t *d_server )
{
{
int
errCode
=
0
;
int
errCode
=
0
;
if
(
d_server
){
if
(
d_server
==
NULL
){
log_it
(
L_ERROR
,
"Server is NULL"
);
log_it
(
L_ERROR
,
"Server is NULL"
);
return
-
1
;
return
-
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