From d85b390f12076cc0b3dc3dc2878296937cc4887c Mon Sep 17 00:00:00 2001 From: Julius Pfrommer Date: Mon, 25 Dec 2023 17:00:41 +0100 Subject: [PATCH] refactor(test): Add alternative URL for IPv6 multicast subscriber test --- tests/pubsub/check_pubsub_subscribe.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tests/pubsub/check_pubsub_subscribe.c b/tests/pubsub/check_pubsub_subscribe.c index 060fca1363a..4c3dca48e76 100644 --- a/tests/pubsub/check_pubsub_subscribe.c +++ b/tests/pubsub/check_pubsub_subscribe.c @@ -16,6 +16,9 @@ #include "ua_pubsub.h" #include "ua_server_internal.h" +#define MULTICAST_URL "opc.udp://224.0.0.22:4801/" +//#define MULTICAST_URL "opc.udp://[ff01::100]:4801/" + #define UA_SUBSCRIBER_PORT 4801 /* Port for Subscriber*/ #define PUBLISH_INTERVAL 5 /* Publish interval*/ #define PUBLISHER_ID 2234 /* Publisher Id*/ @@ -105,8 +108,7 @@ static void setup(void) { UA_PubSubConnectionConfig connectionConfig; memset(&connectionConfig, 0, sizeof(UA_PubSubConnectionConfig)); connectionConfig.name = UA_STRING("UADP Test Connection"); - UA_NetworkAddressUrlDataType networkAddressUrl = - {UA_STRING_NULL, UA_STRING("opc.udp://224.0.0.22:4801/")}; + UA_NetworkAddressUrlDataType networkAddressUrl = {UA_STRING_NULL, UA_STRING(MULTICAST_URL)}; UA_Variant_setScalar(&connectionConfig.address, &networkAddressUrl, &UA_TYPES[UA_TYPES_NETWORKADDRESSURLDATATYPE]); connectionConfig.transportProfileUri =