Commit 6e0a52e5 authored by Tien-Thinh Nguyen's avatar Tien-Thinh Nguyen

Fix issue for multi parser

parent 2a6d9ce7
...@@ -34,6 +34,7 @@ uint8_t multipart_parser( ...@@ -34,6 +34,7 @@ uint8_t multipart_parser(
std::vector<mime_part> parts = {}; std::vector<mime_part> parts = {};
sp.get_mime_parts(parts); sp.get_mime_parts(parts);
uint8_t size = parts.size(); uint8_t size = parts.size();
// at least 2 parts for Json data and N1 (+ N2) // at least 2 parts for Json data and N1 (+ N2)
if (size < 2) { if (size < 2) {
return size; return size;
...@@ -44,8 +45,6 @@ uint8_t multipart_parser( ...@@ -44,8 +45,6 @@ uint8_t multipart_parser(
bool is_ngap = false; bool is_ngap = false;
if (size > 2) { if (size > 2) {
n2sm = parts[2].body; n2sm = parts[2].body;
} else {
n2sm = "null";
} }
return size; return size;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment