Mercurial > hg > orthanc
changeset 5275:8686476e9d12
fix inclusion of winsock.h
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Fri, 14 Apr 2023 13:16:41 +0200 |
parents | e5b0bd6b2242 |
children | d00064ec4baf |
files | OrthancFramework/Sources/DicomNetworking/DicomAssociation.cpp OrthancFramework/Sources/DicomNetworking/NetworkingCompatibility.h OrthancServer/Plugins/Samples/MultitenantDicom/OrthancFrameworkDependencies.cpp OrthancServer/Sources/OrthancRestApi/OrthancRestResources.cpp |
diffstat | 4 files changed, 13 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/OrthancFramework/Sources/DicomNetworking/DicomAssociation.cpp Fri Apr 14 12:12:34 2023 +0200 +++ b/OrthancFramework/Sources/DicomNetworking/DicomAssociation.cpp Fri Apr 14 13:16:41 2023 +0200 @@ -33,6 +33,10 @@ #include "../OrthancException.h" #include "NetworkingCompatibility.h" +#ifdef _WIN32 +# include <winsock.h> +#endif + #include <dcmtk/dcmnet/diutil.h> // For dcmConnectionTimeout() #include <dcmtk/dcmdata/dcdeftag.h>
--- a/OrthancFramework/Sources/DicomNetworking/NetworkingCompatibility.h Fri Apr 14 12:12:34 2023 +0200 +++ b/OrthancFramework/Sources/DicomNetworking/NetworkingCompatibility.h Fri Apr 14 13:16:41 2023 +0200 @@ -32,7 +32,6 @@ * http://msdn.microsoft.com/en-us/library/windows/desktop/ms738527(v=vs.85).aspx **/ # define HOST_NAME_MAX 256 -# include <winsock.h> #endif
--- a/OrthancServer/Plugins/Samples/MultitenantDicom/OrthancFrameworkDependencies.cpp Fri Apr 14 12:12:34 2023 +0200 +++ b/OrthancServer/Plugins/Samples/MultitenantDicom/OrthancFrameworkDependencies.cpp Fri Apr 14 13:16:41 2023 +0200 @@ -31,6 +31,11 @@ #include <MultitenantDicomResources.h> +#ifdef _WIN32 +// Make sure that "winsock2.h" is included before "winsock.h" +# include <winsock2.h> +#endif + #include "../../../../OrthancFramework/Sources/ChunkedBuffer.cpp" #include "../../../../OrthancFramework/Sources/Compression/DeflateBaseCompressor.cpp" #include "../../../../OrthancFramework/Sources/Compression/GzipCompressor.cpp"
--- a/OrthancServer/Sources/OrthancRestApi/OrthancRestResources.cpp Fri Apr 14 12:12:34 2023 +0200 +++ b/OrthancServer/Sources/OrthancRestApi/OrthancRestResources.cpp Fri Apr 14 13:16:41 2023 +0200 @@ -430,10 +430,8 @@ .SetSummary("Write DICOM onto filesystem") .SetDescription("Write the DICOM file onto the filesystem where Orthanc is running. This is insecure for " "Orthanc servers that are remotely accessible since one could overwrite any system file. " - "Since Orthanc 1.12.0, this route is disabled by default and can be enabled thanks to " - "the `RestApiWriteToFileSystemEnabled` configuration.") - .AddRequestType(MimeType_PlainText, "The Lua script to be executed") - + "Since Orthanc 1.12.0, this route is disabled by default, but can be enabled using " + "the `RestApiWriteToFileSystemEnabled` configuration option.") .SetUriArgument("id", "Orthanc identifier of the DICOM instance of interest") .AddRequestType(MimeType_PlainText, "Target path on the filesystem"); return; @@ -2001,8 +1999,8 @@ std::string r = GetResourceTypeText(t, false /* plural */, false /* upper case */); call.GetDocumentation() .SetTag(GetResourceTypeText(t, true /* plural */, true /* upper case */)) - .SetSummary("List labels (new in Orthanc 1.12.0)") - .SetDescription("Get the labels that are associated with the given " + r) + .SetSummary("List labels") + .SetDescription("Get the labels that are associated with the given " + r + " (new in Orthanc 1.12.0)") .SetUriArgument("id", "Orthanc identifier of the " + r + " of interest") .AddAnswerType(MimeType_Json, "JSON array containing the names of the labels") .SetHttpGetSample(GetDocumentationSampleResource(t) + "/labels", true);