comparison OrthancFramework/Sources/DicomNetworking/Internals/CommandDispatcher.cpp @ 4620:926fa5ef8b4f

added remote AET and IP in verbose logs about DICOM networking
author Sebastien Jodogne <s.jodogne@gmail.com>
date Thu, 15 Apr 2021 11:29:40 +0200
parents 8efeaba1b7f9
children 7053502fbf97
comparison
equal deleted inserted replaced
4616:57b1a36645ae 4620:926fa5ef8b4f
652 { 652 {
653 CLOG(ERROR, DICOM) << cond.text(); 653 CLOG(ERROR, DICOM) << cond.text();
654 AssociationCleanup(assoc); 654 AssociationCleanup(assoc);
655 return NULL; 655 return NULL;
656 } 656 }
657 CLOG(INFO, DICOM) << "Association Acknowledged (Max Send PDV: " << assoc->sendPDVLength << ")"; 657
658 if (ASC_countAcceptedPresentationContexts(assoc->params) == 0) 658 {
659 CLOG(INFO, DICOM) << " (but no valid presentation contexts)"; 659 std::string suffix;
660 if (ASC_countAcceptedPresentationContexts(assoc->params) == 0)
661 suffix = " (but no valid presentation contexts)";
662
663 CLOG(INFO, DICOM) << "Association Acknowledged (Max Send PDV: " << assoc->sendPDVLength
664 << ") to AET " << remoteAet << " on IP " << remoteIp << suffix;
665 }
660 666
661 { 667 {
662 OFString str; 668 OFString str;
663 CLOG(TRACE, DICOM) << "Association Acknowledged Details:" << std::endl 669 CLOG(TRACE, DICOM) << "Association Acknowledged Details:" << std::endl
664 << ASC_dumpParameters(str, assoc->params, ASC_ASSOC_AC); 670 << ASC_dumpParameters(str, assoc->params, ASC_ASSOC_AC);
906 { 912 {
907 // Bad status, which indicates the closing of the connection by 913 // Bad status, which indicates the closing of the connection by
908 // the peer or a network error 914 // the peer or a network error
909 finished = true; 915 finished = true;
910 916
911 CLOG(INFO, DICOM) << cond.text(); 917 CLOG(INFO, DICOM) << "Finishing association with AET " << remoteAet_
918 << " on IP " << remoteIp_ << ": " << cond.text();
912 } 919 }
913 920
914 if (finished) 921 if (finished)
915 { 922 {
916 if (cond == DUL_PEERREQUESTEDRELEASE) 923 if (cond == DUL_PEERREQUESTEDRELEASE)
917 { 924 {
918 CLOG(INFO, DICOM) << "Association Release"; 925 CLOG(INFO, DICOM) << "Association Release with AET " << remoteAet_ << " on IP " << remoteIp_;
919 ASC_acknowledgeRelease(assoc_); 926 ASC_acknowledgeRelease(assoc_);
920 } 927 }
921 else if (cond == DUL_PEERABORTEDASSOCIATION) 928 else if (cond == DUL_PEERABORTEDASSOCIATION)
922 { 929 {
923 CLOG(INFO, DICOM) << "Association Aborted"; 930 CLOG(INFO, DICOM) << "Association Aborted with AET " << remoteAet_ << " on IP " << remoteIp_;
924 } 931 }
925 else 932 else
926 { 933 {
927 OFString temp_str; 934 OFString temp_str;
928 CLOG(INFO, DICOM) << "DIMSE failure (aborting association): " << cond.text(); 935 CLOG(INFO, DICOM) << "DIMSE failure (aborting association with AET " << remoteAet_
936 << " on IP " << remoteIp_ << "): " << cond.text();
929 /* some kind of error so abort the association */ 937 /* some kind of error so abort the association */
930 ASC_abortAssociation(assoc_); 938 ASC_abortAssociation(assoc_);
931 } 939 }
932 } 940 }
933 941