# HG changeset patch # User Sebastien Jodogne # Date 1611143024 -3600 # Node ID e4dae17035b9ada2a446fcaeb2cfb894cac9a813 # Parent 789676a8c96a0455110f1981cda37da517bfd467 fix ParsedDicomCache for emscripten diff -r 789676a8c96a -r e4dae17035b9 OrthancFramework/Sources/DicomParsing/ParsedDicomCache.cpp --- a/OrthancFramework/Sources/DicomParsing/ParsedDicomCache.cpp Tue Jan 19 19:05:04 2021 +0100 +++ b/OrthancFramework/Sources/DicomParsing/ParsedDicomCache.cpp Wed Jan 20 12:43:44 2021 +0100 @@ -71,7 +71,9 @@ size_t ParsedDicomCache::GetNumberOfItems() { +#if !defined(__EMSCRIPTEN__) boost::mutex::scoped_lock lock(mutex_); +#endif if (cache_.get() == NULL) { @@ -88,7 +90,9 @@ size_t ParsedDicomCache::GetCurrentSize() { +#if !defined(__EMSCRIPTEN__) boost::mutex::scoped_lock lock(mutex_); +#endif if (cache_.get() == NULL) { @@ -105,7 +109,9 @@ void ParsedDicomCache::Invalidate(const std::string& id) { +#if !defined(__EMSCRIPTEN__) boost::mutex::scoped_lock lock(mutex_); +#endif if (cache_.get() != NULL) { @@ -124,7 +130,9 @@ ParsedDicomFile* dicom, // Takes ownership size_t fileSize) { +#if !defined(__EMSCRIPTEN__) boost::mutex::scoped_lock lock(mutex_); +#endif if (fileSize >= cacheSize_) { @@ -151,7 +159,9 @@ ParsedDicomCache::Accessor::Accessor(ParsedDicomCache& that, const std::string& id) : +#if !defined(__EMSCRIPTEN__) lock_(that.mutex_), +#endif id_(id), file_(NULL), fileSize_(0) diff -r 789676a8c96a -r e4dae17035b9 OrthancFramework/Sources/DicomParsing/ParsedDicomCache.h --- a/OrthancFramework/Sources/DicomParsing/ParsedDicomCache.h Tue Jan 19 19:05:04 2021 +0100 +++ b/OrthancFramework/Sources/DicomParsing/ParsedDicomCache.h Wed Jan 20 12:43:44 2021 +0100 @@ -32,7 +32,10 @@ private: class Item; +#if !defined(__EMSCRIPTEN__) boost::mutex mutex_; +#endif + size_t cacheSize_; std::unique_ptr cache_; std::unique_ptr largeDicom_; @@ -55,7 +58,10 @@ class Accessor : public boost::noncopyable { private: +#if !defined(__EMSCRIPTEN__) boost::mutex::scoped_lock lock_; +#endif + std::string id_; ParsedDicomFile* file_; size_t fileSize_; diff -r 789676a8c96a -r e4dae17035b9 OrthancServer/Sources/main.cpp --- a/OrthancServer/Sources/main.cpp Tue Jan 19 19:05:04 2021 +0100 +++ b/OrthancServer/Sources/main.cpp Wed Jan 20 12:43:44 2021 +0100 @@ -647,7 +647,7 @@ << "Options are read left to right. In particular, options such as \"--verbose\" can " << std::endl << "reset the value of other log-related options that were read before." << std::endl << std::endl - << "The recommended set of options to debug DICOM communications is " + << "The recommended set of options to debug DICOM communications is " << std::endl << "\"--verbose --trace-dicom --logfile=dicom.log\"" << std::endl << std::endl << "Command-line options:" << std::endl