Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
M
mongoose
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
esp
mongoose
Commits
547ec85b
Commit
547ec85b
authored
Dec 08, 2015
by
Deomid Ryabkov
Committed by
rojer
Dec 08, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Properly disable socketpair-related stuff
PUBLISHED_FROM=f3a236470281af80848c8f78163980083190c081
parent
845d751e
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
4 deletions
+10
-4
mongoose.c
mongoose.c
+5
-1
mongoose.h
mongoose.h
+5
-3
No files found.
mongoose.c
View file @
547ec85b
...
...
@@ -1925,7 +1925,9 @@ void mg_close_conn(struct mg_connection *conn) {
void
mg_mgr_init
(
struct
mg_mgr
*
m
,
void
*
user_data
)
{
memset
(
m
,
0
,
sizeof
(
*
m
));
#ifndef MG_DISABLE_SOCKETPAIR
m
->
ctl
[
0
]
=
m
->
ctl
[
1
]
=
INVALID_SOCKET
;
#endif
m
->
user_data
=
user_data
;
#ifdef _WIN32
...
...
@@ -1989,8 +1991,8 @@ void mg_mgr_free(struct mg_mgr *m) {
#ifndef MG_DISABLE_SOCKETPAIR
if
(
m
->
ctl
[
0
]
!=
INVALID_SOCKET
)
closesocket
(
m
->
ctl
[
0
]);
if
(
m
->
ctl
[
1
]
!=
INVALID_SOCKET
)
closesocket
(
m
->
ctl
[
1
]);
#endif
m
->
ctl
[
0
]
=
m
->
ctl
[
1
]
=
INVALID_SOCKET
;
#endif
for
(
conn
=
m
->
active_connections
;
conn
!=
NULL
;
conn
=
tmp_conn
)
{
tmp_conn
=
conn
->
next
;
...
...
@@ -3367,7 +3369,9 @@ time_t mg_mgr_poll(struct mg_mgr *mgr, int milli) {
FD_ZERO
(
&
read_set
);
FD_ZERO
(
&
write_set
);
FD_ZERO
(
&
err_set
);
#ifndef MG_DISABLE_SOCKETPAIR
mg_add_to_set
(
mgr
->
ctl
[
1
],
&
read_set
,
&
max_fd
);
#endif
for
(
nc
=
mgr
->
active_connections
,
num_fds
=
0
;
nc
!=
NULL
;
nc
=
tmp
)
{
tmp
=
nc
->
next
;
...
...
mongoose.h
View file @
547ec85b
...
...
@@ -706,9 +706,11 @@ typedef void (*mg_event_handler_t)(struct mg_connection *, int ev, void *);
struct
mg_mgr
{
struct
mg_connection
*
active_connections
;
const
char
*
hexdump_file
;
/* Debug hexdump file path */
sock_t
ctl
[
2
];
/* Socketpair for mg_wakeup() */
void
*
user_data
;
/* User data */
void
*
mgr_data
;
/* Implementation-specific event manager's data. */
#ifndef MG_DISABLE_SOCKETPAIR
sock_t
ctl
[
2
];
/* Socketpair for mg_wakeup() */
#endif
void
*
user_data
;
/* User data */
void
*
mgr_data
;
/* Implementation-specific event manager's data. */
#ifdef MG_ENABLE_JAVASCRIPT
struct
v7
*
v7
;
#endif
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment