Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
M
mongoose
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
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
Ganil-acq
GANILinux
linux-service
library
mongoose
Commits
e70d98b7
Commit
e70d98b7
authored
11 years ago
by
Sergey Lyubka
Browse files
Options
Downloads
Patches
Plain Diff
Added fixes for eCos
parent
bea012a3
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
mongoose.c
+10
-1
10 additions, 1 deletion
mongoose.c
with
10 additions
and
1 deletion
mongoose.c
+
10
−
1
View file @
e70d98b7
...
...
@@ -176,6 +176,10 @@ struct ll { struct ll *prev, *next; };
#define MONGOOSE_USE_IDLE_TIMEOUT_SECONDS 30
#endif
#ifdef MONGOOSE_NO_SOCKETPAIR
#define MONGOOSE_NO_CGI
#endif
#ifdef MONGOOSE_ENABLE_DEBUG
#define DBG(x) do { printf("%-20s ", __func__); printf x; putchar('\n'); \
fflush(stdout); } while(0)
...
...
@@ -3843,7 +3847,10 @@ unsigned int mg_poll_server(struct mg_server *server, int milliseconds) {
// Accept new connections
if
(
FD_ISSET
(
server
->
listening_sock
,
&
read_set
))
{
while
((
conn
=
accept_new_connection
(
server
))
!=
NULL
)
{
// We're not looping here, and accepting just one connection at
// a time. The reason is that eCos does not respect non-blocking
// flag on a listening socket and hangs in a loop.
if
((
conn
=
accept_new_connection
(
server
))
!=
NULL
)
{
conn
->
birth_time
=
conn
->
last_activity_time
=
current_time
;
}
}
...
...
@@ -4198,11 +4205,13 @@ struct mg_server *mg_create_server(void *server_data) {
LINKED_LIST_INIT
(
&
server
->
active_connections
);
#ifndef MONGOOSE_NO_SOCKETPAIR
// Create control socket pair. Do it in a loop to protect from
// interrupted syscalls in mg_socketpair().
do
{
mg_socketpair
(
server
->
ctl
);
}
while
(
server
->
ctl
[
0
]
==
INVALID_SOCKET
);
#endif
#ifdef MONGOOSE_USE_SSL
SSL_library_init
();
...
...
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