Mercurial > hg > orthanc
comparison 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 |
comparison
equal
deleted
inserted
replaced
4285:544120b34c09 | 4286:526bd8bad850 |
---|---|
198 /* out */ | 198 /* out */ |
199 T_DIMSE_C_FindRSP *response, | 199 T_DIMSE_C_FindRSP *response, |
200 DcmDataset **responseIdentifiers, | 200 DcmDataset **responseIdentifiers, |
201 DcmDataset **statusDetail) | 201 DcmDataset **statusDetail) |
202 { | 202 { |
203 assert(response != NULL); | |
203 assert(requestIdentifiers != NULL); | 204 assert(requestIdentifiers != NULL); |
204 | 205 |
205 bzero(response, sizeof(T_DIMSE_C_FindRSP)); | 206 bzero(response, sizeof(T_DIMSE_C_FindRSP)); |
206 *statusDetail = NULL; | 207 *statusDetail = NULL; |
207 | 208 |
325 if (responseCount <= static_cast<int>(data.answers_.GetSize())) | 326 if (responseCount <= static_cast<int>(data.answers_.GetSize())) |
326 { | 327 { |
327 // There are pending results that are still to be sent | 328 // There are pending results that are still to be sent |
328 response->DimseStatus = STATUS_Pending; | 329 response->DimseStatus = STATUS_Pending; |
329 *responseIdentifiers = data.answers_.ExtractDcmDataset(responseCount - 1); | 330 *responseIdentifiers = data.answers_.ExtractDcmDataset(responseCount - 1); |
331 | |
332 if (*responseIdentifiers) | |
333 { | |
334 std::stringstream s; // This is necessary for VS2008 | |
335 s << DcmObject::PrintHelper(**responseIdentifiers); | |
336 OFString str; | |
337 CLOG(TRACE, DICOM) << "Sending C-FIND Response " | |
338 << responseCount << "/" << data.answers_.GetSize() << ":" << std::endl | |
339 << s.str(); | |
340 } | |
330 } | 341 } |
331 else if (data.answers_.IsComplete()) | 342 else if (data.answers_.IsComplete()) |
332 { | 343 { |
333 // Success: All the results have been sent | 344 // Success: All the results have been sent |
334 response->DimseStatus = STATUS_Success; | 345 response->DimseStatus = STATUS_Success; |
338 { | 349 { |
339 // Success, but the results were too numerous and had to be cropped | 350 // Success, but the results were too numerous and had to be cropped |
340 CLOG(WARNING, DICOM) << "Too many results for an incoming C-FIND query"; | 351 CLOG(WARNING, DICOM) << "Too many results for an incoming C-FIND query"; |
341 response->DimseStatus = STATUS_FIND_Cancel_MatchingTerminatedDueToCancelRequest; | 352 response->DimseStatus = STATUS_FIND_Cancel_MatchingTerminatedDueToCancelRequest; |
342 *responseIdentifiers = NULL; | 353 *responseIdentifiers = NULL; |
343 } | |
344 | |
345 { | |
346 OFString str; | |
347 CLOG(TRACE, DICOM) << "Sending C-FIND Response:" << std::endl | |
348 << DIMSE_dumpMessage(str, *response, DIMSE_OUTGOING); | |
349 } | |
350 | |
351 if (*responseIdentifiers) | |
352 { | |
353 std::stringstream s; // This is necessary for VS2008 | |
354 s << DcmObject::PrintHelper(**responseIdentifiers); | |
355 CLOG(TRACE, DICOM) << "C-FIND Response Content " | |
356 << responseCount << "/" << data.answers_.GetSize() << ":" << std::endl | |
357 << s.str(); | |
358 } | 354 } |
359 } | 355 } |
360 } | 356 } |
361 | 357 |
362 | 358 |