diff options
author | Stanislav Kobziev (GitHub) <43001407+SKobziev@users.noreply.github.com> | 2020-05-21 20:08:25 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-05-21 13:08:25 -0400 |
commit | b2ee094fdabbf8d41722aa7507ad22faa9c0fcb2 (patch) | |
tree | c380ebace7fc45c653a285e4e2417f9df1bf110a /src/components/protocol_handler/src/protocol_handler_impl.cc | |
parent | 4900a41b0759ddb4c35e445412b4c4ebd2149ab8 (diff) | |
download | sdl_core-b2ee094fdabbf8d41722aa7507ad22faa9c0fcb2.tar.gz |
Fix messages protocol version check (#2771)
* Fix messages protocol version check
Fixed the messages protocol version check and
name of ProcessData method parameter 'result' was changed
to 'out_result' for more clarity
* fix copy-paste error and fix style
Co-authored-by: Collin <iCollin@users.noreply.github.com>
Co-authored-by: collin <collin+i@collinmcqueen.com>
Diffstat (limited to 'src/components/protocol_handler/src/protocol_handler_impl.cc')
-rw-r--r-- | src/components/protocol_handler/src/protocol_handler_impl.cc | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/components/protocol_handler/src/protocol_handler_impl.cc b/src/components/protocol_handler/src/protocol_handler_impl.cc index 04c1529573..ace27fb307 100644 --- a/src/components/protocol_handler/src/protocol_handler_impl.cc +++ b/src/components/protocol_handler/src/protocol_handler_impl.cc @@ -104,6 +104,8 @@ ProtocolHandlerImpl::ProtocolHandlerImpl( get_settings().maximum_audio_payload_size()); protocol_header_validator_.set_max_video_payload_size( get_settings().maximum_video_payload_size()); + protocol_header_validator_.set_max_protocol_version_supported( + get_settings().max_supported_protocol_version()); incoming_data_handler_.set_validator(&protocol_header_validator_); const size_t& message_frequency_count = @@ -976,17 +978,17 @@ void ProtocolHandlerImpl::OnTMMessageReceived(const RawMessagePtr tm_message) { size_t malformed_occurs = 0u; const ProtocolFramePtrList protocol_frames = incoming_data_handler_.ProcessData( - *tm_message, &result, &malformed_occurs); - LOG4CXX_DEBUG(logger_, "Proccessed " << protocol_frames.size() << " frames"); + *tm_message, result, &malformed_occurs); + LOG4CXX_DEBUG(logger_, "Processed " << protocol_frames.size() << " frames"); if (result != RESULT_OK) { if (result == RESULT_MALFORMED_OCCURS) { LOG4CXX_WARN( logger_, "Malformed message occurs, connection id " << connection_key); if (!get_settings().malformed_message_filtering()) { - LOG4CXX_DEBUG(logger_, "Malformed message filterign disabled"); + LOG4CXX_DEBUG(logger_, "Malformed message filtering disabled"); session_observer_.OnMalformedMessageCallback(connection_key); - // For tracking only malformed occurrence check outpute + // For tracking only malformed occurrence check output } else { if (malformed_occurs > 0) { TrackMalformedMessage(connection_key, malformed_occurs); |