File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -185,15 +185,20 @@ class Config {
185185 if (pProcType == ProcessType::StfSender) {
186186 const auto lErrorMsg = fmt::format (" Parameter <{}> for StfSender must be provided on command line." ,
187187 OptionKeyDiscoveryId);
188- EDDLOG ( lErrorMsg);
188+ EDDLOG (lErrorMsg);
189189 throw std::invalid_argument (lErrorMsg);
190190 }
191191 }
192192
193193 {
194194 // get an unique ID
195- std::string lUniquePart = boost::lexical_cast<std::string>(boost::uuids::random_generator ()());
196- std::string lUniqueId = pProcType.to_string () + " -" + boost::asio::ip::host_name () + " -" + lUniquePart;
195+ const std::string lUniquePart = boost::lexical_cast<std::string>(boost::uuids::random_generator ()());
196+ std::string lHostname = boost::asio::ip::host_name ();
197+ lHostname = lHostname.substr (0 , lHostname.find (' .' ));
198+
199+ std::string lUniqueId = pProcType.to_string ();
200+ lUniqueId += " -" + lHostname;
201+ lUniqueId += " -" + lUniquePart.substr (0 , 8 );
197202
198203 IDDLOG (" Parameter {} not provided, using random value={}" , Config::OptionKeyDiscoveryId, lUniqueId);
199204 return lUniqueId;
You can’t perform that action at this time.
0 commit comments