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
85d19dad
Commit
85d19dad
authored
Dec 28, 2017
by
Dmitry Frank
Committed by
Cesanta Bot
Dec 28, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Respect recv_mbuf_limit in lwip
PUBLISHED_FROM=470ff0f484bff3e4478651f0b64cc160bba8ebfc
parent
c5cc4141
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
2 deletions
+5
-2
mongoose.c
mongoose.c
+5
-2
No files found.
mongoose.c
View file @
85d19dad
...
...
@@ -15003,9 +15003,12 @@ static void mg_lwip_handle_recv_tcp(struct mg_connection *nc) {
#endif
mgos_lock
();
while
(
cs
->
rx_chain
!=
NULL
)
{
while
(
cs
->
rx_chain
!=
NULL
&&
nc
->
recv_mbuf
.
len
<
nc
->
recv_mbuf_limit
)
{
struct
pbuf
*
seg
=
cs
->
rx_chain
;
size_t
len
=
(
seg
->
len
-
cs
->
rx_offset
);
size_t
seg_len
=
(
seg
->
len
-
cs
->
rx_offset
);
size_t
buf_avail
=
(
nc
->
recv_mbuf_limit
-
nc
->
recv_mbuf
.
len
);
size_t
len
=
MIN
(
seg_len
,
buf_avail
);
char
*
data
=
(
char
*
)
MG_MALLOC
(
len
);
if
(
data
==
NULL
)
{
mgos_unlock
();
...
...
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