diff options
Diffstat (limited to 'src/components/protocol_handler/src/protocol_handler_impl.cc')
-rw-r--r-- | src/components/protocol_handler/src/protocol_handler_impl.cc | 25 |
1 files changed, 14 insertions, 11 deletions
diff --git a/src/components/protocol_handler/src/protocol_handler_impl.cc b/src/components/protocol_handler/src/protocol_handler_impl.cc index 23ac2927ef..0c4b72b535 100644 --- a/src/components/protocol_handler/src/protocol_handler_impl.cc +++ b/src/components/protocol_handler/src/protocol_handler_impl.cc @@ -1173,12 +1173,12 @@ RESULT_CODE ProtocolHandlerImpl::HandleControlMessageEndServiceACK( LOG4CXX_AUTO_TRACE(logger_); const uint8_t current_session_id = packet.session_id(); - const uint32_t hash_id = get_hash_id(packet); + uint32_t hash_id = get_hash_id(packet); const ServiceType service_type = ServiceTypeFromByte(packet.service_type()); const ConnectionID connection_id = packet.connection_id(); const uint32_t session_key = session_observer_.OnSessionEndedCallback( - connection_id, current_session_id, hash_id, service_type); + connection_id, current_session_id, &hash_id, service_type); if (0 == session_key) { LOG4CXX_WARN(logger_, "Refused to end service"); @@ -1307,7 +1307,9 @@ class StartSessionHandler : public security_manager::SecurityManagerListener { } // namespace #endif // ENABLE_SECURITY -// DEPRECATED +// Suppress warning for deprecated method used within another deprecated method +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" RESULT_CODE ProtocolHandlerImpl::HandleControlMessageStartSession( const ProtocolPacket& packet) { LOG4CXX_AUTO_TRACE(logger_); @@ -1461,6 +1463,7 @@ RESULT_CODE ProtocolHandlerImpl::HandleControlMessageStartSession( } return RESULT_OK; } +#pragma GCC diagnostic pop RESULT_CODE ProtocolHandlerImpl::HandleControlMessageStartSession( const ProtocolFramePtr packet) { @@ -1895,11 +1898,11 @@ RESULT_CODE ProtocolHandlerImpl::EncryptFrame(ProtocolFramePtr packet) { connection_key, security_manager::SecurityManager::ERROR_ENCRYPTION_FAILED, error_text); + + uint32_t hash_id = packet->message_id(); // Close session to prevent usage unprotected service/session - session_observer_.OnSessionEndedCallback(packet->connection_id(), - packet->session_id(), - packet->message_id(), - kRpc); + session_observer_.OnSessionEndedCallback( + packet->connection_id(), packet->session_id(), &hash_id, kRpc); return RESULT_OK; } LOG4CXX_DEBUG(logger_, @@ -1948,11 +1951,11 @@ RESULT_CODE ProtocolHandlerImpl::DecryptFrame(ProtocolFramePtr packet) { connection_key, security_manager::SecurityManager::ERROR_DECRYPTION_FAILED, error_text); + + uint32_t hash_id = packet->message_id(); // Close session to prevent usage unprotected service/session - session_observer_.OnSessionEndedCallback(packet->connection_id(), - packet->session_id(), - packet->message_id(), - kRpc); + session_observer_.OnSessionEndedCallback( + packet->connection_id(), packet->session_id(), &hash_id, kRpc); return RESULT_ENCRYPTION_FAILED; } LOG4CXX_DEBUG(logger_, |