comparison 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
comparison
equal deleted inserted replaced
4284:756126cd2219 4285:544120b34c09
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(requestIdentifiers != NULL);
204
203 bzero(response, sizeof(T_DIMSE_C_FindRSP)); 205 bzero(response, sizeof(T_DIMSE_C_FindRSP));
204 *statusDetail = NULL; 206 *statusDetail = NULL;
205 207
206 std::string sopClassUid(request->AffectedSOPClassUID); 208 std::string sopClassUid(request->AffectedSOPClassUID);
207 209
208 FindScpData& data = *reinterpret_cast<FindScpData*>(callbackData); 210 FindScpData& data = *reinterpret_cast<FindScpData*>(callbackData);
209 if (data.lastRequest_ == NULL) 211 if (data.lastRequest_ == NULL)
210 { 212 {
213 {
214 std::stringstream s; // This is necessary for VS2008
215 s << DcmObject::PrintHelper(*requestIdentifiers);
216 CLOG(TRACE, DICOM) << "Received C-FIND Request:" << std::endl << s.str();
217 }
218
211 bool ok = false; 219 bool ok = false;
212 220
213 try 221 try
214 { 222 {
215 RemoteModalityParameters modality; 223 RemoteModalityParameters modality;
330 { 338 {
331 // Success, but the results were too numerous and had to be cropped 339 // Success, but the results were too numerous and had to be cropped
332 CLOG(WARNING, DICOM) << "Too many results for an incoming C-FIND query"; 340 CLOG(WARNING, DICOM) << "Too many results for an incoming C-FIND query";
333 response->DimseStatus = STATUS_FIND_Cancel_MatchingTerminatedDueToCancelRequest; 341 response->DimseStatus = STATUS_FIND_Cancel_MatchingTerminatedDueToCancelRequest;
334 *responseIdentifiers = NULL; 342 *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();
335 } 358 }
336 } 359 }
337 } 360 }
338 361
339 362