changeset 1234:a65ad39596cb

author Sebastien Jodogne <s.jodogne@gmail.com>
date Fri, 05 Dec 2014 11:11:58 +0100
parents eac00401cb96
children 9b4977e3c19d
files NEWS OrthancServer/DicomProtocol/DicomServer.cpp
diffstat 2 files changed, 11 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/NEWS	Thu Dec 04 17:18:18 2014 +0100
+++ b/NEWS	Fri Dec 05 11:11:58 2014 +0100
@@ -5,6 +5,7 @@
 * Plugins can extend Orthanc Explorer with custom JavaScript
 * Instances without PatientID are now allowed
 * Support of Tudor DICOM in Query/Retrieve
+* Fix issue 25 (AET with underscore not allowed)
 
 
 Version 0.8.5 (2014/11/04)
--- a/OrthancServer/DicomProtocol/DicomServer.cpp	Thu Dec 04 17:18:18 2014 +0100
+++ b/OrthancServer/DicomProtocol/DicomServer.cpp	Fri Dec 05 11:11:58 2014 +0100
@@ -278,11 +278,19 @@
       throw OrthancException("Too short AET");
     }
 
+    if (aet.size() > 16)
+    {
+      throw OrthancException("AET must be shorter than 16 characters");
+    }
+
     for (size_t i = 0; i < aet.size(); i++)
     {
-      if (!isalnum(aet[i]) && aet[i] != '-')
+      if (!isalnum(aet[i]) && 
+          aet[i] != '-' && 
+          aet[i] != '_')
       {
-        throw OrthancException("Only alphanumeric characters are allowed in AET");
+        LOG(WARNING) << "For best interoperability, only upper case, alphanumeric characters should be present in AET: \"" << aet << "\"";
+        break;
       }
     }