Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
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
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
mongoose
Commits
aaf1fc3a
Commit
aaf1fc3a
authored
Sep 28, 2018
by
Deomid Ryabkov
Committed by
Cesanta Bot
Sep 28, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Schedule a poll when LwIP reports TCP data sent
PUBLISHED_FROM=0cf3029d9a9b851882325e2298b878bc83fc2d33
parent
8b423530
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
0 deletions
+14
-0
mongoose.c
mongoose.c
+7
-0
mg_lwip_net_if.c
src/common/platforms/lwip/mg_lwip_net_if.c
+7
-0
No files found.
mongoose.c
View file @
aaf1fc3a
...
...
@@ -15220,6 +15220,9 @@ static err_t mg_lwip_tcp_sent_cb(void *arg, struct tcp_pcb *tpcb,
nc
->
send_mbuf
.
len
==
0
&&
tpcb
->
unsent
==
NULL
&&
tpcb
->
unacked
==
NULL
)
{
mg_lwip_post_signal
(
MG_SIG_CLOSE_CONN
,
nc
);
}
if
(
nc
->
send_mbuf
.
len
>
0
||
(
nc
->
flags
&
MG_F_WANT_WRITE
))
{
mg_lwip_mgr_schedule_poll
(
nc
->
mgr
);
}
(
void
)
num_sent
;
return
ERR_OK
;
}
...
...
@@ -15582,6 +15585,10 @@ static int mg_lwip_if_can_send(struct mg_connection *nc,
can_send
=
(
cs
->
pcb
.
udp
!=
NULL
);
}
else
{
can_send
=
(
cs
->
pcb
.
tcp
!=
NULL
&&
cs
->
pcb
.
tcp
->
snd_buf
>
0
);
/* See comment above. */
#if CS_PLATFORM == CS_P_ESP8266
if
(
cs
->
pcb
.
tcp
->
unacked
!=
NULL
)
can_send
=
0
;
#endif
}
}
return
can_send
;
...
...
src/common/platforms/lwip/mg_lwip_net_if.c
View file @
aaf1fc3a
...
...
@@ -200,6 +200,9 @@ static err_t mg_lwip_tcp_sent_cb(void *arg, struct tcp_pcb *tpcb,
nc
->
send_mbuf
.
len
==
0
&&
tpcb
->
unsent
==
NULL
&&
tpcb
->
unacked
==
NULL
)
{
mg_lwip_post_signal
(
MG_SIG_CLOSE_CONN
,
nc
);
}
if
(
nc
->
send_mbuf
.
len
>
0
||
(
nc
->
flags
&
MG_F_WANT_WRITE
))
{
mg_lwip_mgr_schedule_poll
(
nc
->
mgr
);
}
(
void
)
num_sent
;
return
ERR_OK
;
}
...
...
@@ -562,6 +565,10 @@ static int mg_lwip_if_can_send(struct mg_connection *nc,
can_send
=
(
cs
->
pcb
.
udp
!=
NULL
);
}
else
{
can_send
=
(
cs
->
pcb
.
tcp
!=
NULL
&&
cs
->
pcb
.
tcp
->
snd_buf
>
0
);
/* See comment above. */
#if CS_PLATFORM == CS_P_ESP8266
if
(
cs
->
pcb
.
tcp
->
unacked
!=
NULL
)
can_send
=
0
;
#endif
}
}
return
can_send
;
...
...
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