diff options
author | Andriy Byzhynar <AByzhynar@luxoft.com> | 2018-01-22 17:50:53 +0200 |
---|---|---|
committer | Andriy Byzhynar <AByzhynar@luxoft.com> | 2018-01-22 17:50:53 +0200 |
commit | 82d13ffda5f1d946f815a9f0a7de13e0add2fc44 (patch) | |
tree | 939c4864d1ef9101414b99560ac81f10e303c242 | |
parent | 1d710a202cfed11af514ad375019ca284afd9001 (diff) | |
download | sdl_core-82d13ffda5f1d946f815a9f0a7de13e0add2fc44.tar.gz |
Fix difference in device hash generationfeature/IAP_over_BT
Fixed difference in device id hash generation
which was different for SDL built with unit-tests and without
-rw-r--r-- | src/components/transport_manager/src/tcp/tcp_client_listener.cc | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/components/transport_manager/src/tcp/tcp_client_listener.cc b/src/components/transport_manager/src/tcp/tcp_client_listener.cc index 9525482640..207149eb8c 100644 --- a/src/components/transport_manager/src/tcp/tcp_client_listener.cc +++ b/src/components/transport_manager/src/tcp/tcp_client_listener.cc @@ -235,15 +235,18 @@ void TcpClientListener::Loop() { if (enable_keepalive_) { SetKeepaliveOptions(connection_fd); } -#if defined(BUILD_TESTS) + const auto device_uid = device_name + std::string(":") + std::to_string(port_); + +#if defined(BUILD_TESTS) TcpDevice* tcp_device = new TcpDevice(client_address.sin_addr.s_addr, device_uid, device_name); #else TcpDevice* tcp_device = - new TcpDevice(client_address.sin_addr.s_addr, device_name); + new TcpDevice(client_address.sin_addr.s_addr, device_uid); #endif // BUILD_TESTS + DeviceSptr device = controller_->AddDevice(tcp_device); tcp_device = static_cast<TcpDevice*>(device.get()); const ApplicationHandle app_handle = |