mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-04-22 03:40:04 +02:00
fixed bug. setting rx_hostname to none should not throw
This commit is contained in:
parent
146b012eff
commit
dde62f13d5
@ -1163,17 +1163,17 @@ std::string Module::getReceiverHostname() const {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void Module::setReceiverHostname(const std::string &receiverIP) {
|
void Module::setReceiverHostname(const std::string &receiverIP) {
|
||||||
LOG(logDEBUG1) << "Setting up Receiver with " << receiverIP;
|
LOG(logDEBUG1) << "Setting up Receiver hostname with " << receiverIP;
|
||||||
|
|
||||||
|
if (getRunStatus() == RUNNING) {
|
||||||
|
throw RuntimeError("Cannot set receiver hostname. Acquisition already running. Stop it first.");
|
||||||
|
}
|
||||||
|
|
||||||
if (receiverIP == "none") {
|
if (receiverIP == "none") {
|
||||||
memset(shm()->rxHostname, 0, MAX_STR_LENGTH);
|
memset(shm()->rxHostname, 0, MAX_STR_LENGTH);
|
||||||
sls::strcpy_safe(shm()->rxHostname, "none");
|
sls::strcpy_safe(shm()->rxHostname, "none");
|
||||||
shm()->useReceiverFlag = false;
|
shm()->useReceiverFlag = false;
|
||||||
}
|
return;
|
||||||
|
|
||||||
if (getRunStatus() == RUNNING) {
|
|
||||||
LOG(logWARNING) << "Acquisition already running, Stopping it.";
|
|
||||||
stopAcquisition();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// start updating
|
// start updating
|
||||||
|
Loading…
x
Reference in New Issue
Block a user