From 895439b01beb2e14a2d3a44981b116bd44b3e473 Mon Sep 17 00:00:00 2001 From: Dhanya Thattil Date: Fri, 8 May 2026 11:08:01 +0200 Subject: [PATCH] fix test, check port position for detector type --- slsReceiverSoftware/src/ClientInterface.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/slsReceiverSoftware/src/ClientInterface.cpp b/slsReceiverSoftware/src/ClientInterface.cpp index 82a55e07b..2b43c617f 100644 --- a/slsReceiverSoftware/src/ClientInterface.cpp +++ b/slsReceiverSoftware/src/ClientInterface.cpp @@ -1683,6 +1683,9 @@ int ClientInterface::set_port_udp_datastream(Interface &socket) { portPosition port = static_cast(args[0]); validate_port_position(port); bool enable = static_cast(args[1]); + if (impl()->getNumberofUDPInterfaces() == 1) + throw RuntimeError("Cannot change UDP port datastream with only 1 " + "interface enabled. Hint: set 'numinterfaces' to 2"); LOG(logDEBUG1) << "Setting udp datastream (" << ToString(port) << ") to " << ToString(enable); verifyIdle(socket);