Mercurial > hg > orthanc
diff OrthancFramework/Sources/DicomNetworking/Internals/FindScp.cpp @ 4285:544120b34c09
fix for VS2008, debug logs for C-FIND SCP and for storage commitment SCP
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Wed, 04 Nov 2020 16:27:59 +0100 |
parents | 756126cd2219 |
children | 526bd8bad850 |
line wrap: on
line diff
--- a/OrthancFramework/Sources/DicomNetworking/Internals/FindScp.cpp Wed Nov 04 15:01:47 2020 +0100 +++ b/OrthancFramework/Sources/DicomNetworking/Internals/FindScp.cpp Wed Nov 04 16:27:59 2020 +0100 @@ -200,6 +200,8 @@ DcmDataset **responseIdentifiers, DcmDataset **statusDetail) { + assert(requestIdentifiers != NULL); + bzero(response, sizeof(T_DIMSE_C_FindRSP)); *statusDetail = NULL; @@ -208,6 +210,12 @@ FindScpData& data = *reinterpret_cast<FindScpData*>(callbackData); if (data.lastRequest_ == NULL) { + { + std::stringstream s; // This is necessary for VS2008 + s << DcmObject::PrintHelper(*requestIdentifiers); + CLOG(TRACE, DICOM) << "Received C-FIND Request:" << std::endl << s.str(); + } + bool ok = false; try @@ -333,6 +341,21 @@ response->DimseStatus = STATUS_FIND_Cancel_MatchingTerminatedDueToCancelRequest; *responseIdentifiers = NULL; } + + { + OFString str; + CLOG(TRACE, DICOM) << "Sending C-FIND Response:" << std::endl + << DIMSE_dumpMessage(str, *response, DIMSE_OUTGOING); + } + + if (*responseIdentifiers) + { + std::stringstream s; // This is necessary for VS2008 + s << DcmObject::PrintHelper(**responseIdentifiers); + CLOG(TRACE, DICOM) << "C-FIND Response Content " + << responseCount << "/" << data.answers_.GetSize() << ":" << std::endl + << s.str(); + } } }