Merge pull request #5865 from Icinga/fix/uuid

Add missing initializer in Utility::NewUniqueID()
This commit is contained in:
Michael Friedrich 2017-12-15 09:08:26 +01:00 committed by GitHub
commit 20d7221dfe
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -34,6 +34,7 @@
#include <boost/algorithm/string/trim.hpp>
#include <boost/algorithm/string/replace.hpp>
#include <boost/uuid/uuid_io.hpp>
#include <boost/uuid/uuid_generators.hpp>
#include <ios>
#include <fstream>
#include <iostream>
@ -441,8 +442,7 @@ void Utility::Sleep(double timeout)
*/
String Utility::NewUniqueID(void)
{
boost::uuids::uuid u;
return boost::lexical_cast<std::string>(u);
return boost::lexical_cast<std::string>(boost::uuids::random_generator()());
}
#ifdef _WIN32