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
8c2e641e
Commit
8c2e641e
authored
Dec 14, 2016
by
Alexander Alashkin
Committed by
Cesanta Bot
Dec 14, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Simplest c_hello/stm32
PUBLISHED_FROM=3a22eb96ff011ef8327cd1b78b56a3af86ba2c84
parent
29c53082
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
4 deletions
+11
-4
mongoose.c
mongoose.c
+11
-4
No files found.
mongoose.c
View file @
8c2e641e
...
@@ -2050,7 +2050,9 @@ MG_INTERNAL void mg_add_conn(struct mg_mgr *mgr, struct mg_connection *c) {
...
@@ -2050,7 +2050,9 @@ MG_INTERNAL void mg_add_conn(struct mg_mgr *mgr, struct mg_connection *c) {
mgr
->
active_connections
=
c
;
mgr
->
active_connections
=
c
;
c
->
prev
=
NULL
;
c
->
prev
=
NULL
;
if
(
c
->
next
!=
NULL
)
c
->
next
->
prev
=
c
;
if
(
c
->
next
!=
NULL
)
c
->
next
->
prev
=
c
;
if
(
c
->
sock
!=
INVALID_SOCKET
)
{
c
->
iface
->
vtable
->
add_conn
(
c
);
c
->
iface
->
vtable
->
add_conn
(
c
);
}
}
}
MG_INTERNAL
void
mg_remove_conn
(
struct
mg_connection
*
conn
)
{
MG_INTERNAL
void
mg_remove_conn
(
struct
mg_connection
*
conn
)
{
...
@@ -2960,7 +2962,9 @@ double mg_set_timer(struct mg_connection *c, double timestamp) {
...
@@ -2960,7 +2962,9 @@ double mg_set_timer(struct mg_connection *c, double timestamp) {
}
}
void
mg_sock_set
(
struct
mg_connection
*
nc
,
sock_t
sock
)
{
void
mg_sock_set
(
struct
mg_connection
*
nc
,
sock_t
sock
)
{
if
(
sock
!=
INVALID_SOCKET
)
{
nc
->
iface
->
vtable
->
sock_set
(
nc
,
sock
);
nc
->
iface
->
vtable
->
sock_set
(
nc
,
sock
);
}
}
}
void
mg_if_get_conn_addr
(
struct
mg_connection
*
nc
,
int
remote
,
void
mg_if_get_conn_addr
(
struct
mg_connection
*
nc
,
int
remote
,
...
@@ -13275,7 +13279,7 @@ time_t mg_sl_if_poll(struct mg_iface *iface, int timeout_ms) {
...
@@ -13275,7 +13279,7 @@ time_t mg_sl_if_poll(struct mg_iface *iface, int timeout_ms) {
struct
SlTimeval_t
tv
;
struct
SlTimeval_t
tv
;
SlFdSet_t
read_set
,
write_set
,
err_set
;
SlFdSet_t
read_set
,
write_set
,
err_set
;
sock_t
max_fd
=
INVALID_SOCKET
;
sock_t
max_fd
=
INVALID_SOCKET
;
int
num_fds
,
num_ev
,
num_timers
=
0
;
int
num_fds
,
num_ev
=
0
,
num_timers
=
0
;
SL_FD_ZERO
(
&
read_set
);
SL_FD_ZERO
(
&
read_set
);
SL_FD_ZERO
(
&
write_set
);
SL_FD_ZERO
(
&
write_set
);
...
@@ -13330,7 +13334,10 @@ time_t mg_sl_if_poll(struct mg_iface *iface, int timeout_ms) {
...
@@ -13330,7 +13334,10 @@ time_t mg_sl_if_poll(struct mg_iface *iface, int timeout_ms) {
tv
.
tv_sec
=
timeout_ms
/
1000
;
tv
.
tv_sec
=
timeout_ms
/
1000
;
tv
.
tv_usec
=
(
timeout_ms
%
1000
)
*
1000
;
tv
.
tv_usec
=
(
timeout_ms
%
1000
)
*
1000
;
if
(
num_fds
>
0
)
{
num_ev
=
sl_Select
((
int
)
max_fd
+
1
,
&
read_set
,
&
write_set
,
&
err_set
,
&
tv
);
num_ev
=
sl_Select
((
int
)
max_fd
+
1
,
&
read_set
,
&
write_set
,
&
err_set
,
&
tv
);
}
now
=
mg_time
();
now
=
mg_time
();
DBG
((
"sl_Select @ %ld num_ev=%d of %d, timeout=%d"
,
(
long
)
now
,
num_ev
,
DBG
((
"sl_Select @ %ld num_ev=%d of %d, timeout=%d"
,
(
long
)
now
,
num_ev
,
num_fds
,
timeout_ms
));
num_fds
,
timeout_ms
));
...
...
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