From 56bc9c4e08dbcbe6e03225793a4697343121b890 Mon Sep 17 00:00:00 2001 From: Dhanya Thattil Date: Mon, 27 Apr 2020 14:00:00 +0200 Subject: [PATCH] fix for segfault WIP --- slsDetectorSoftware/src/Detector.cpp | 8 ++++++-- slsDetectorSoftware/src/DetectorImpl.cpp | 1 + 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/slsDetectorSoftware/src/Detector.cpp b/slsDetectorSoftware/src/Detector.cpp index 748f513b7..396dacd44 100644 --- a/slsDetectorSoftware/src/Detector.cpp +++ b/slsDetectorSoftware/src/Detector.cpp @@ -784,8 +784,12 @@ void Detector::setRxHostname(const int udpInterface, const std::string &hostname void Detector::setRxHostname(const int udpInterface, const std::string &hostname, const int port, int module_id) { - if (module_id == -1 && size() > 1) { - throw sls::RuntimeError("Cannot set same rx_tcpport and rx_hostname for multiple receivers"); + if (module_id == -1) { + if (size() > 1) { + throw sls::RuntimeError("Cannot set same rx_tcpport and rx_hostname for multiple receivers"); + } else { + module_id = 0; + } } pimpl->configureReceiver(udpInterface, module_id, hostname, port); } diff --git a/slsDetectorSoftware/src/DetectorImpl.cpp b/slsDetectorSoftware/src/DetectorImpl.cpp index 4a3cea7e2..6e8ab952d 100755 --- a/slsDetectorSoftware/src/DetectorImpl.cpp +++ b/slsDetectorSoftware/src/DetectorImpl.cpp @@ -502,6 +502,7 @@ void DetectorImpl::configureReceiver(const int udpInterface, int module_id, if (!isReceiverInitialized(udpInterface)) { initReceiver(udpInterface); } + std::cout << "module_id:"<getReceiverParameters(); if (udpInterface == 1) { receivers[module_id][0]->setTCPPort(port);