Mercurial > hg > orthanc
diff OrthancFramework/Sources/DicomNetworking/Internals/FindScp.cpp @ 4286:526bd8bad850
debug logs for C-MOVE and C-GET SCP
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Wed, 04 Nov 2020 17:40:25 +0100 |
parents | 544120b34c09 |
children | 5b254bd435d3 |
line wrap: on
line diff
--- a/OrthancFramework/Sources/DicomNetworking/Internals/FindScp.cpp Wed Nov 04 16:27:59 2020 +0100 +++ b/OrthancFramework/Sources/DicomNetworking/Internals/FindScp.cpp Wed Nov 04 17:40:25 2020 +0100 @@ -200,6 +200,7 @@ DcmDataset **responseIdentifiers, DcmDataset **statusDetail) { + assert(response != NULL); assert(requestIdentifiers != NULL); bzero(response, sizeof(T_DIMSE_C_FindRSP)); @@ -327,6 +328,16 @@ // There are pending results that are still to be sent response->DimseStatus = STATUS_Pending; *responseIdentifiers = data.answers_.ExtractDcmDataset(responseCount - 1); + + if (*responseIdentifiers) + { + std::stringstream s; // This is necessary for VS2008 + s << DcmObject::PrintHelper(**responseIdentifiers); + OFString str; + CLOG(TRACE, DICOM) << "Sending C-FIND Response " + << responseCount << "/" << data.answers_.GetSize() << ":" << std::endl + << s.str(); + } } else if (data.answers_.IsComplete()) { @@ -341,21 +352,6 @@ 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(); - } } }