comparison OrthancServer/Sources/OrthancFindRequestHandler.cpp @ 4482:8efeaba1b7f9

new configuration options: "DicomAlwaysAllowFind" and "DicomAlwaysAllowGet"
author Sebastien Jodogne <s.jodogne@gmail.com>
date Thu, 28 Jan 2021 15:54:30 +0100
parents c1f36fd13730
children f0038043fb97 7053502fbf97
comparison
equal deleted inserted replaced
4481:fe7c2be5bce2 4482:8efeaba1b7f9
590 const std::string& calledAet, 590 const std::string& calledAet,
591 ModalityManufacturer manufacturer) 591 ModalityManufacturer manufacturer)
592 { 592 {
593 MetricsRegistry::Timer timer(context_.GetMetricsRegistry(), "orthanc_find_scp_duration_ms"); 593 MetricsRegistry::Timer timer(context_.GetMetricsRegistry(), "orthanc_find_scp_duration_ms");
594 594
595
596 /**
597 * Deal with global configuration
598 **/
599
600 bool caseSensitivePN;
601
602 {
603 OrthancConfiguration::ReaderLock lock;
604 caseSensitivePN = lock.GetConfiguration().GetBooleanParameter("CaseSensitivePN", false);
605
606 RemoteModalityParameters remote;
607 if (!lock.GetConfiguration().LookupDicomModalityUsingAETitle(remote, remoteAet))
608 {
609 if (lock.GetConfiguration().GetBooleanParameter("DicomAlwaysAllowFind", false))
610 {
611 CLOG(INFO, DICOM) << "C-FIND: Allowing SCU request from unknown modality with AET: " << remoteAet;
612 }
613 else
614 {
615 // This should never happen, given the test at bottom of
616 // "OrthancApplicationEntityFilter::IsAllowedRequest()"
617 throw OrthancException(ErrorCode_InexistentItem,
618 "C-FIND: Rejecting SCU request from unknown modality with AET: " + remoteAet);
619 }
620 }
621 }
622
623
624
595 /** 625 /**
596 * Possibly apply the user-supplied Lua filter. 626 * Possibly apply the user-supplied Lua filter.
597 **/ 627 **/
598 628
599 DicomMap lua; 629 DicomMap lua;
666 * Build up the query object. 696 * Build up the query object.
667 **/ 697 **/
668 698
669 DatabaseLookup lookup; 699 DatabaseLookup lookup;
670 700
671 bool caseSensitivePN;
672
673 {
674 OrthancConfiguration::ReaderLock lock;
675 caseSensitivePN = lock.GetConfiguration().GetBooleanParameter("CaseSensitivePN", false);
676 }
677
678 for (size_t i = 0; i < query.GetSize(); i++) 701 for (size_t i = 0; i < query.GetSize(); i++)
679 { 702 {
680 const DicomElement& element = query.GetElement(i); 703 const DicomElement& element = query.GetElement(i);
681 const DicomTag tag = element.GetTag(); 704 const DicomTag tag = element.GetTag();
682 705