diff --git a/aeron-driver/src/main/c/media/aeron_udp_channel.c b/aeron-driver/src/main/c/media/aeron_udp_channel.c index 8ca77bebef..e1a1a7dbe5 100644 --- a/aeron-driver/src/main/c/media/aeron_udp_channel.c +++ b/aeron-driver/src/main/c/media/aeron_udp_channel.c @@ -313,12 +313,12 @@ int aeron_udp_channel_parse(size_t uri_length, const char *uri, aeron_udp_channe } if (aeron_find_multicast_interface( - endpoint_addr.ss_family, _channel->uri.params.udp.interface, &interface_addr, &interface_index) < 0) + endpoint_addr.ss_family, _channel->uri.params.udp.interface_key, &interface_addr, &interface_index) < 0) { aeron_set_err( - -AERON_ERROR_CODE_INVALID_CHANNEL, - "could not find interface=(%s): %s", - _channel->uri.params.udp.interface, aeron_errmsg()); + -AERON_ERROR_CODE_INVALID_CHANNEL, + "could not find interface=(%s): %s", + _channel->uri.params.udp.interface_key, aeron_errmsg()); goto error_cleanup; } @@ -347,7 +347,7 @@ int aeron_udp_channel_parse(size_t uri_length, const char *uri, aeron_udp_channe else { if (aeron_find_unicast_interface( - endpoint_addr.ss_family, _channel->uri.params.udp.interface, &interface_addr, &interface_index) < 0) + endpoint_addr.ss_family, _channel->uri.params.udp.interface_key, &interface_addr, &interface_index) < 0) { goto error_cleanup; } diff --git a/aeron-driver/src/main/c/uri/aeron_uri.c b/aeron-driver/src/main/c/uri/aeron_uri.c index 315c3ad5bf..d3ef2b8cd6 100755 --- a/aeron-driver/src/main/c/uri/aeron_uri.c +++ b/aeron-driver/src/main/c/uri/aeron_uri.c @@ -136,7 +136,7 @@ static int aeron_udp_uri_params_func(void *clientd, const char *key, const char } else if (strcmp(key, AERON_UDP_CHANNEL_INTERFACE_KEY) == 0) { - params->interface = value; + params->interface_key = value; } else if (strcmp(key, AERON_UDP_CHANNEL_TTL_KEY) == 0) { @@ -184,7 +184,7 @@ int aeron_udp_uri_parse(char *uri, aeron_udp_channel_params_t *params) params->additional_params.length = 0; params->additional_params.array = NULL; params->endpoint = NULL; - params->interface = NULL; + params->interface_key = NULL; params->ttl = NULL; params->control = NULL; params->channel_tag = NULL; diff --git a/aeron-driver/src/main/c/uri/aeron_uri.h b/aeron-driver/src/main/c/uri/aeron_uri.h index e7c05fe95a..52eafd21d8 100644 --- a/aeron-driver/src/main/c/uri/aeron_uri.h +++ b/aeron-driver/src/main/c/uri/aeron_uri.h @@ -92,7 +92,7 @@ aeron_uri_subscription_params_t; typedef struct aeron_udp_channel_params_stct { const char *endpoint; - const char *interface; + const char *interface_key; const char *control; const char *control_mode; const char *channel_tag; diff --git a/aeron-driver/src/test/c/aeron_uri_test.cpp b/aeron-driver/src/test/c/aeron_uri_test.cpp index 1e8a2fad29..1ddfd00784 100644 --- a/aeron-driver/src/test/c/aeron_uri_test.cpp +++ b/aeron-driver/src/test/c/aeron_uri_test.cpp @@ -119,7 +119,7 @@ TEST_F(UriTest, shouldParseWithMultipleParams) EXPECT_EQ(AERON_URI_PARSE("aeron:udp?endpoint=224.10.9.8|port=4567|interface=192.168.0.3|ttl=16", &m_uri), 0); ASSERT_EQ(m_uri.type, AERON_URI_UDP); EXPECT_EQ(std::string(m_uri.params.udp.endpoint), "224.10.9.8"); - EXPECT_EQ(std::string(m_uri.params.udp.interface), "192.168.0.3"); + EXPECT_EQ(std::string(m_uri.params.udp.interface_key), "192.168.0.3"); EXPECT_EQ(std::string(m_uri.params.udp.ttl), "16"); EXPECT_EQ(m_uri.params.udp.additional_params.length, 1u); EXPECT_EQ(std::string(m_uri.params.udp.additional_params.array[0].key), "port");