diff options
author | jacobkeeler <jacob.keeler@livioradio.com> | 2018-08-17 19:02:02 -0400 |
---|---|---|
committer | jacobkeeler <jacob.keeler@livioradio.com> | 2018-08-17 19:58:45 -0400 |
commit | 150b945b1484758d891ed449ac8ca1d860e22ac7 (patch) | |
tree | c63650c2b8394263b0baabebf564a0644dd2937e /src/components/connection_handler/src | |
parent | 6314b805b8940d21c415a48aee0e3e52208e071a (diff) | |
download | sdl_core-150b945b1484758d891ed449ac8ca1d860e22ac7.tar.gz |
Remove deprecated methods from projectfeature/remove_deprecated_functions_5_0
Diffstat (limited to 'src/components/connection_handler/src')
-rw-r--r-- | src/components/connection_handler/src/connection_handler_impl.cc | 81 |
1 files changed, 0 insertions, 81 deletions
diff --git a/src/components/connection_handler/src/connection_handler_impl.cc b/src/components/connection_handler/src/connection_handler_impl.cc index 9aa84989d9..045985f650 100644 --- a/src/components/connection_handler/src/connection_handler_impl.cc +++ b/src/components/connection_handler/src/connection_handler_impl.cc @@ -338,77 +338,6 @@ bool AllowProtection(const ConnectionHandlerSettings& settings, } #endif // ENABLE_SECURITY -uint32_t ConnectionHandlerImpl::OnSessionStartedCallback( - const transport_manager::ConnectionUID connection_handle, - const uint8_t session_id, - const protocol_handler::ServiceType& service_type, - const bool is_protected, - uint32_t* hash_id) { - LOG4CXX_AUTO_TRACE(logger_); - - if (hash_id) { - *hash_id = protocol_handler::HASH_ID_WRONG; - } - -#ifdef ENABLE_SECURITY - if (!AllowProtection(get_settings(), service_type, is_protected)) { - return 0; - } -#endif // ENABLE_SECURITY - sync_primitives::AutoReadLock lock(connection_list_lock_); - ConnectionList::iterator it = connection_list_.find(connection_handle); - if (connection_list_.end() == it) { - LOG4CXX_ERROR(logger_, "Unknown connection!"); - return 0; - } - uint32_t new_session_id = 0; - - Connection* connection = it->second; - if ((0 == session_id) && (protocol_handler::kRpc == service_type)) { - new_session_id = connection->AddNewSession(connection_handle); - if (0 == new_session_id) { - LOG4CXX_ERROR(logger_, "Couldn't start new session!"); - return 0; - } - if (hash_id) { - *hash_id = KeyFromPair(connection_handle, new_session_id); - } - } else { // Could be create new service or protected exists one - if (!connection->AddNewService( - session_id, service_type, is_protected, connection_handle)) { - LOG4CXX_ERROR(logger_, - "Couldn't establish " -#ifdef ENABLE_SECURITY - << (is_protected ? "protected" : "non-protected") -#endif // ENABLE_SECURITY - << " service " << static_cast<int>(service_type) - << " for session " << static_cast<int>(session_id)); - return 0; - } - new_session_id = session_id; - if (hash_id) { - *hash_id = protocol_handler::HASH_ID_NOT_SUPPORTED; - } - } - sync_primitives::AutoReadLock read_lock(connection_handler_observer_lock_); - if (connection_handler_observer_) { - const uint32_t session_key = KeyFromPair(connection_handle, new_session_id); - const bool success = connection_handler_observer_->OnServiceStartedCallback( - connection->connection_device_handle(), session_key, service_type); - if (!success) { - LOG4CXX_WARN(logger_, - "Service starting forbidden by connection_handler_observer"); - if (protocol_handler::kRpc == service_type) { - connection->RemoveSession(new_session_id); - } else { - connection->RemoveService(session_id, service_type); - } - return 0; - } - } - return new_session_id; -} - void ConnectionHandlerImpl::OnSessionStartedCallback( const transport_manager::ConnectionUID connection_handle, const uint8_t session_id, @@ -643,16 +572,6 @@ void ConnectionHandlerImpl::OnMalformedMessageCallback( uint32_t ConnectionHandlerImpl::OnSessionEndedCallback( const transport_manager::ConnectionUID connection_handle, const uint8_t session_id, - const uint32_t& hashCode, - const protocol_handler::ServiceType& service_type) { - uint32_t hashValue = hashCode; - return OnSessionEndedCallback( - connection_handle, session_id, &hashValue, service_type); -} - -uint32_t ConnectionHandlerImpl::OnSessionEndedCallback( - const transport_manager::ConnectionUID connection_handle, - const uint8_t session_id, uint32_t* hashCode, const protocol_handler::ServiceType& service_type) { LOG4CXX_AUTO_TRACE(logger_); |