Skip to content

Commit 424d3f5

Browse files
Merge pull request #2427 from FerdinandSpitzschnueffler/iox-2426-fix-gateway-channel
iox-#2426 Fix comparison operator in channel.inl
2 parents c616c3b + 476539f commit 424d3f5

File tree

4 files changed

+17
-3
lines changed

4 files changed

+17
-3
lines changed

doc/website/release-notes/iceoryx-unreleased.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@
146146
- Fix span span constructor assert when using begin/end constructor [#2253](https://github.com/eclipse-iceoryx/iceoryx/issues/2253)
147147
- Listener examples need to take all samples in the callback [#2251](https://github.com/eclipse-iceoryx/iceoryx/issues/2251)
148148
- 'iox::string' tests can exceed the translation unit compilation timeout [#2278](https://github.com/eclipse-iceoryx/iceoryx/issues/2278)
149-
- Building iceoryx with bazel on Windows is broken [#2320](https://github.com/eclipse-iceoryx/iceoryx/issues/2320)
149+
- Building iceoryx with bazel on Windows is broken [#2320](https://github.com/eclipse-iceoryx/iceoryx/issues/2320)
150150
- Fix wrong memory orders in SpscSoFi [#2177](https://github.com/eclipse-iceoryx/iceoryx/issues/2177)
151151
- ssize_t: redefinition; different basic types [#2209](https://github.com/eclipse-iceoryx/iceoryx/issues/2209)
152152
- Fix bazel build on macos [#2345](https://github.com/eclipse-iceoryx/iceoryx/issues/2345)
@@ -155,6 +155,7 @@
155155
- Depend on @ncurses when building with Bazel [#2372](https://github.com/eclipse-iceoryx/iceoryx/issues/2372)
156156
- Fix windows performance issue [#2377](https://github.com/eclipse-iceoryx/iceoryx/issues/2377)
157157
- Max Client and Server cannot be configured independently of Max Publisher and Subscriber [#2394](https://github.com/eclipse-iceoryx/iceoryx/issues/2394)
158+
- Fix call to non-existing `getService` in channel.inl [#2426](https://github.com/eclipse-iceoryx/iceoryx/issues/2426)
158159

159160
**Refactoring:**
160161

iceoryx_posh/include/iceoryx_posh/gateway/channel.hpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@
2222
#include "iceoryx_posh/iceoryx_posh_types.hpp"
2323
#include "iox/expected.hpp"
2424
#include "iox/fixed_position_container.hpp"
25-
#include "iox/optional.hpp"
2625

2726
#include <memory>
2827

iceoryx_posh/include/iceoryx_posh/internal/gateway/channel.inl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ template <typename IceoryxTerminal, typename ExternalTerminal>
5050
constexpr inline bool Channel<IceoryxTerminal, ExternalTerminal>::operator==(
5151
const Channel<IceoryxTerminal, ExternalTerminal>& rhs) const noexcept
5252
{
53-
return m_service == rhs.getService();
53+
return m_service == rhs.getServiceDescription();
5454
}
5555

5656
template <typename IceoryxTerminal, typename ExternalTerminal>

iceoryx_posh/test/moduletests/test_gw_channel.cpp

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,4 +62,18 @@ TEST_F(ChannelTest, ReturnsErrorIfPoolExhausted)
6262
EXPECT_FALSE(channel.has_error());
6363
}
6464

65+
TEST_F(ChannelTest, ComparisonWorks)
66+
{
67+
::testing::Test::RecordProperty("TEST_ID", "535de22b-575d-467c-810a-6beced4d4144");
68+
auto channel1 = iox::gw::Channel<StubbedIceoryxTerminal, StubbedExternalTerminal>::create(
69+
{"", "", ""}, StubbedIceoryxTerminal::Options());
70+
ASSERT_FALSE(channel1.has_error());
71+
EXPECT_TRUE(channel1 == channel1);
72+
73+
auto channel2 = iox::gw::Channel<StubbedIceoryxTerminal, StubbedExternalTerminal>::create(
74+
{"Service", "", ""}, StubbedIceoryxTerminal::Options());
75+
ASSERT_FALSE(channel2.has_error());
76+
EXPECT_FALSE(channel1 == channel2);
77+
}
78+
6579
} // namespace

0 commit comments

Comments
 (0)