summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrii Kalinich (GitHub) <AKalinich@luxoft.com>2021-08-24 13:23:38 -0400
committerGitHub <noreply@github.com>2021-08-24 13:23:38 -0400
commit90879643717a1f8fef5061345e5e9b279329619f (patch)
tree5347a0706ecd252bded7e25ad8ceb8c6d34d9708
parentca0cdaf10bae555a7bb5bdec0026adcc5f317eb6 (diff)
downloadsdl_core-90879643717a1f8fef5061345e5e9b279329619f.tar.gz
Ignore frame data for single and first frames (#3762)
Co-authored-by: VladSemenyuk <vsemenyuk@luxoft.com>
-rw-r--r--src/components/protocol_handler/src/multiframe_builder.cc1
-rw-r--r--src/components/protocol_handler/src/protocol_packet.cc13
2 files changed, 1 insertions, 13 deletions
diff --git a/src/components/protocol_handler/src/multiframe_builder.cc b/src/components/protocol_handler/src/multiframe_builder.cc
index 875b5b5933..b66ce9b911 100644
--- a/src/components/protocol_handler/src/multiframe_builder.cc
+++ b/src/components/protocol_handler/src/multiframe_builder.cc
@@ -197,6 +197,7 @@ RESULT_CODE MultiFrameBuilder::HandleFirstFrame(const ProtocolFramePtr packet) {
<< connection_id
<< ", session_id: " << static_cast<int>(session_id)
<< ", message_id: " << message_id);
+ packet->set_frame_data(FRAME_DATA_FIRST);
messageId_map[message_id] = {packet, date_time::getCurrentTime()};
return RESULT_OK;
}
diff --git a/src/components/protocol_handler/src/protocol_packet.cc b/src/components/protocol_handler/src/protocol_packet.cc
index 9c3dd03141..51b5e838b3 100644
--- a/src/components/protocol_handler/src/protocol_packet.cc
+++ b/src/components/protocol_handler/src/protocol_packet.cc
@@ -325,21 +325,8 @@ RESULT_CODE ProtocolPacket::ProtocolHeaderValidator::validate(
break;
}
case FRAME_TYPE_SINGLE:
- if (header.frameData != FRAME_DATA_SINGLE) {
- SDL_LOG_WARN("FRAME_TYPE_SINGLE - Invalide frame data "
- << static_cast<int>(header.frameData));
- return RESULT_FAIL;
- }
- break;
case FRAME_TYPE_FIRST:
- if (header.frameData != FRAME_DATA_FIRST) {
- SDL_LOG_WARN("FRAME_TYPE_FIRST - Invalide frame data "
- << static_cast<int>(header.frameData));
- return RESULT_FAIL;
- }
- break;
case FRAME_TYPE_CONSECUTIVE:
- // Could have any FrameInfo value
break;
default:
SDL_LOG_WARN("Unknown frame type " << static_cast<int>(header.frameType));