Mercurial > hg > orthanc
diff Core/Toolbox.cpp @ 2172:84d1d392a9ab
GenerateUuid() not available in sandboxed environments
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Wed, 23 Nov 2016 12:06:00 +0100 |
parents | fd5875662670 |
children | 1c42860097fc |
line wrap: on
line diff
--- a/Core/Toolbox.cpp Wed Nov 23 11:46:42 2016 +0100 +++ b/Core/Toolbox.cpp Wed Nov 23 12:06:00 2016 +0100 @@ -78,19 +78,6 @@ -// Inclusions for UUID -// http://stackoverflow.com/a/1626302 - -extern "C" -{ -#ifdef WIN32 -# include <rpc.h> -#else -# include <uuid/uuid.h> -#endif -} - - #if ORTHANC_ENABLE_PUGIXML == 1 # include "ChunkedBuffer.h" # include <pugixml.hpp> @@ -1226,28 +1213,6 @@ } - std::string Toolbox::GenerateUuid() - { -#ifdef WIN32 - UUID uuid; - UuidCreate ( &uuid ); - - unsigned char * str; - UuidToStringA ( &uuid, &str ); - - std::string s( ( char* ) str ); - - RpcStringFreeA ( &str ); -#else - uuid_t uuid; - uuid_generate_random ( uuid ); - char s[37]; - uuid_unparse ( uuid, s ); -#endif - return s; - } - - bool Toolbox::IsUuid(const std::string& str) { if (str.size() != 36)