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
fcc75c6a
Commit
fcc75c6a
authored
Oct 21, 2016
by
Ilia Penev
Committed by
Cesanta Bot
Oct 21, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix CoAP packet size calculation
PUBLISHED_FROM=43532ec3951779d17438b457fe6de6dea8f514fd
parent
e08b2343
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
1 deletion
+2
-1
mongoose.c
mongoose.c
+2
-1
No files found.
mongoose.c
View file @
fcc75c6a
...
...
@@ -9694,7 +9694,7 @@ static uint32_t coap_calculate_packet_size(struct mg_coap_message *cm,
prev_opt_number
=
0
;
while
(
opt
!=
NULL
)
{
*
len
+=
1
;
/* basic delta/length */
*
len
+=
coap_get_ext_opt_size
(
opt
->
number
);
*
len
+=
coap_get_ext_opt_size
(
opt
->
number
-
prev_opt_number
);
*
len
+=
coap_get_ext_opt_size
((
uint32_t
)
opt
->
value
.
len
);
/*
* Current implementation performs check if
...
...
@@ -9708,6 +9708,7 @@ static uint32_t coap_calculate_packet_size(struct mg_coap_message *cm,
return
MG_COAP_ERROR
|
MG_COAP_OPTIOMG_FIELD
;
}
*
len
+=
opt
->
value
.
len
;
prev_opt_number
=
opt
->
number
;
opt
=
opt
->
next
;
}
...
...
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