rx_hostname can be added with port and also concatenated

This commit is contained in:
2020-03-19 14:06:16 +01:00
parent 272a8bfaf1
commit 16d5321885
5 changed files with 90 additions and 12 deletions

View File

@@ -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();