mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-12-16 09:31:19 +01:00
fix for segfault WIP
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
@@ -502,6 +502,7 @@ void DetectorImpl::configureReceiver(const int udpInterface, int module_id,
|
||||
if (!isReceiverInitialized(udpInterface)) {
|
||||
initReceiver(udpInterface);
|
||||
}
|
||||
std::cout << "module_id:"<<module_id << std::endl;
|
||||
auto t = detectors[module_id]->getReceiverParameters();
|
||||
if (udpInterface == 1) {
|
||||
receivers[module_id][0]->setTCPPort(port);
|
||||
|
||||
Reference in New Issue
Block a user