diff options
author | fronneburg <fronneburg@xevo.com> | 2018-07-05 09:02:32 -0700 |
---|---|---|
committer | fronneburg <fronneburg@xevo.com> | 2018-07-05 09:03:34 -0700 |
commit | d4159c1768e28dccdd6027a714de59f93e06c8b2 (patch) | |
tree | 346e3e301ee90585344873aca49d14be1c77e991 | |
parent | 83ca7c4b715c5927f774d9d0edd9b9a5e1f54317 (diff) | |
download | sdl_core-d4159c1768e28dccdd6027a714de59f93e06c8b2.tar.gz |
address review comments
-rw-r--r-- | src/components/connection_handler/src/connection.cc | 7 | ||||
-rw-r--r-- | src/components/protocol_handler/src/protocol_handler_impl.cc | 2 |
2 files changed, 4 insertions, 5 deletions
diff --git a/src/components/connection_handler/src/connection.cc b/src/components/connection_handler/src/connection.cc index b926234b9c..b8399b2c9b 100644 --- a/src/components/connection_handler/src/connection.cc +++ b/src/components/connection_handler/src/connection.cc @@ -123,14 +123,13 @@ uint32_t Connection::AddNewSession( const transport_manager::ConnectionUID connection_handle) { LOG4CXX_AUTO_TRACE(logger_); - // Even though we have our own SessionMap, we use the Connection Handler's - // SessionConnectionMap to generate a session ID. We want to make sure that - // session IDs are globally unique, and not only unique within a Connection. - // NESTED LOCK: make sure to lock session_map_lock_ then ConnectionHandler's // session_connection_map_lock_ptr_ (which will be taken in AddSession) sync_primitives::AutoLock lock(session_map_lock_); + // Even though we have our own SessionMap, we use the Connection Handler's + // SessionConnectionMap to generate a session ID. We want to make sure that + // session IDs are globally unique, and not only unique within a Connection. const uint32_t session_id = connection_handler_->AddSession(connection_handle); if (session_id > 0) { diff --git a/src/components/protocol_handler/src/protocol_handler_impl.cc b/src/components/protocol_handler/src/protocol_handler_impl.cc index 523bdadea0..6548f86c6a 100644 --- a/src/components/protocol_handler/src/protocol_handler_impl.cc +++ b/src/components/protocol_handler/src/protocol_handler_impl.cc @@ -2538,7 +2538,7 @@ void ProtocolHandlerImpl::GenerateServiceTransportsForStartSessionAck( LOG4CXX_AUTO_TRACE(logger_); if (service_transports.size() == 0) { - if (secondary_enabled) { + if (secondary_enabled && !secondary_transport_types.empty()) { LOG4CXX_TRACE(logger_, "Empty Service Transports. Allowing service to run on both " "connections"); |