mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-12-31 16:41:18 +01:00
rx_hostname can be added with port and also concatenated
This commit is contained in:
@@ -1679,7 +1679,13 @@ std::string Module::setReceiverHostname(const std::string &receiverIP) {
|
||||
updateCachedDetectorVariables();
|
||||
|
||||
// start updating
|
||||
sls::strcpy_safe(shm()->rxHostname, receiverIP.c_str());
|
||||
std::string host = receiverIP;
|
||||
auto res = sls::split(host, ':');
|
||||
if (res.size() > 1) {
|
||||
host = res[0];
|
||||
shm()->rxTCPPort = std::stoi(res[1]);
|
||||
}
|
||||
sls::strcpy_safe(shm()->rxHostname, host.c_str());
|
||||
shm()->useReceiverFlag = true;
|
||||
checkReceiverVersionCompatibility();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user