Mercurial > hg > orthanc
comparison OrthancServer/Internals/CommandDispatcher.cpp @ 1573:3309878b3e16
more information about the origin of requests submitted to the DICOM handlers
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Tue, 25 Aug 2015 13:05:22 +0200 |
parents | f967bdf8534e |
children | 164d78911382 |
comparison
equal
deleted
inserted
replaced
1572:904096e7367e | 1573:3309878b3e16 |
---|---|
769 | 769 |
770 // Check whether this request is allowed by the security filter | 770 // Check whether this request is allowed by the security filter |
771 if (supported && | 771 if (supported && |
772 request != DicomRequestType_Echo && // Always allow incoming ECHO requests | 772 request != DicomRequestType_Echo && // Always allow incoming ECHO requests |
773 filter_ != NULL && | 773 filter_ != NULL && |
774 !filter_->IsAllowedRequest(callingIP_, callingAETitle_, request)) | 774 !filter_->IsAllowedRequest(remoteIp_, remoteAet_, request)) |
775 { | 775 { |
776 LOG(ERROR) << EnumerationToString(request) | 776 LOG(ERROR) << EnumerationToString(request) |
777 << " requests are disallowed for the AET \"" | 777 << " requests are disallowed for the AET \"" |
778 << callingAETitle_ << "\""; | 778 << remoteAet_ << "\""; |
779 cond = DIMSE_ILLEGALASSOCIATION; | 779 cond = DIMSE_ILLEGALASSOCIATION; |
780 supported = false; | 780 supported = false; |
781 finished = true; | 781 finished = true; |
782 } | 782 } |
783 | 783 |
796 case DicomRequestType_Store: | 796 case DicomRequestType_Store: |
797 if (server_.HasStoreRequestHandlerFactory()) // Should always be true | 797 if (server_.HasStoreRequestHandlerFactory()) // Should always be true |
798 { | 798 { |
799 std::auto_ptr<IStoreRequestHandler> handler | 799 std::auto_ptr<IStoreRequestHandler> handler |
800 (server_.GetStoreRequestHandlerFactory().ConstructStoreRequestHandler()); | 800 (server_.GetStoreRequestHandlerFactory().ConstructStoreRequestHandler()); |
801 cond = Internals::storeScp(assoc_, &msg, presID, *handler); | 801 cond = Internals::storeScp(assoc_, &msg, presID, *handler, remoteIp_); |
802 } | 802 } |
803 break; | 803 break; |
804 | 804 |
805 case DicomRequestType_Move: | 805 case DicomRequestType_Move: |
806 if (server_.HasMoveRequestHandlerFactory()) // Should always be true | 806 if (server_.HasMoveRequestHandlerFactory()) // Should always be true |
807 { | 807 { |
808 std::auto_ptr<IMoveRequestHandler> handler | 808 std::auto_ptr<IMoveRequestHandler> handler |
809 (server_.GetMoveRequestHandlerFactory().ConstructMoveRequestHandler()); | 809 (server_.GetMoveRequestHandlerFactory().ConstructMoveRequestHandler()); |
810 cond = Internals::moveScp(assoc_, &msg, presID, *handler); | 810 cond = Internals::moveScp(assoc_, &msg, presID, *handler, remoteIp_, remoteAet_); |
811 } | 811 } |
812 break; | 812 break; |
813 | 813 |
814 case DicomRequestType_Find: | 814 case DicomRequestType_Find: |
815 if (server_.HasFindRequestHandlerFactory()) // Should always be true | 815 if (server_.HasFindRequestHandlerFactory()) // Should always be true |
816 { | 816 { |
817 std::auto_ptr<IFindRequestHandler> handler | 817 std::auto_ptr<IFindRequestHandler> handler |
818 (server_.GetFindRequestHandlerFactory().ConstructFindRequestHandler()); | 818 (server_.GetFindRequestHandlerFactory().ConstructFindRequestHandler()); |
819 cond = Internals::findScp(assoc_, &msg, presID, *handler, callingAETitle_); | 819 cond = Internals::findScp(assoc_, &msg, presID, *handler, remoteIp_, remoteAet_); |
820 } | 820 } |
821 break; | 821 break; |
822 | 822 |
823 default: | 823 default: |
824 // Should never happen | 824 // Should never happen |