comparison Core/DicomNetworking/DicomStoreUserConnection.cpp @ 3875:ea1d32861cfc transcoding

moving timeout from DicomAssocation to DicomAssociationParameters
author Sebastien Jodogne <s.jodogne@gmail.com>
date Mon, 04 May 2020 14:49:31 +0200
parents 2effa961f67f
children a18b34dec94a
comparison
equal deleted inserted replaced
3874:2effa961f67f 3875:ea1d32861cfc
177 if (!dataset.findAndGetOFString(DCM_SOPClassUID, a).good() || 177 if (!dataset.findAndGetOFString(DCM_SOPClassUID, a).good() ||
178 !dataset.findAndGetOFString(DCM_SOPInstanceUID, b).good()) 178 !dataset.findAndGetOFString(DCM_SOPInstanceUID, b).good())
179 { 179 {
180 throw OrthancException(ErrorCode_NoSopClassOrInstance, 180 throw OrthancException(ErrorCode_NoSopClassOrInstance,
181 "Unable to determine the SOP class/instance for C-STORE with AET " + 181 "Unable to determine the SOP class/instance for C-STORE with AET " +
182 parameters_.GetRemoteApplicationEntityTitle()); 182 parameters_.GetRemoteModality().GetApplicationEntityTitle());
183 } 183 }
184 184
185 sopClassUid.assign(a.c_str()); 185 sopClassUid.assign(a.c_str());
186 sopInstanceUid.assign(b.c_str()); 186 sopInstanceUid.assign(b.c_str());
187 187
211 211
212 // The association must be re-negotiated 212 // The association must be re-negotiated
213 if (association_->IsOpen()) 213 if (association_->IsOpen())
214 { 214 {
215 LOG(INFO) << "Re-negociating DICOM association with " 215 LOG(INFO) << "Re-negociating DICOM association with "
216 << parameters_.GetRemoteApplicationEntityTitle(); 216 << parameters_.GetRemoteModality().GetApplicationEntityTitle();
217 } 217 }
218 218
219 association_->ClearPresentationContexts(); 219 association_->ClearPresentationContexts();
220 RegisterStorageClass(sopClassUid, transferSyntax); 220 RegisterStorageClass(sopClassUid, transferSyntax);
221 221
310 throw OrthancException(ErrorCode_NetworkProtocol, 310 throw OrthancException(ErrorCode_NetworkProtocol,
311 "No valid presentation context was negotiated for " 311 "No valid presentation context was negotiated for "
312 "SOP class UID [" + sopClassUid + "] and transfer " 312 "SOP class UID [" + sopClassUid + "] and transfer "
313 "syntax [" + GetTransferSyntaxUid(transferSyntax) + "] " 313 "syntax [" + GetTransferSyntaxUid(transferSyntax) + "] "
314 "while sending to modality [" + 314 "while sending to modality [" +
315 parameters_.GetRemoteApplicationEntityTitle() + "]"); 315 parameters_.GetRemoteModality().GetApplicationEntityTitle() + "]");
316 } 316 }
317 317
318 // Prepare the transmission of data 318 // Prepare the transmission of data
319 T_DIMSE_C_StoreRQ request; 319 T_DIMSE_C_StoreRQ request;
320 memset(&request, 0, sizeof(request)); 320 memset(&request, 0, sizeof(request));
362 { 362 {
363 char buf[16]; 363 char buf[16];
364 sprintf(buf, "%04X", response.DimseStatus); 364 sprintf(buf, "%04X", response.DimseStatus);
365 throw OrthancException(ErrorCode_NetworkProtocol, 365 throw OrthancException(ErrorCode_NetworkProtocol,
366 "C-STORE SCU to AET \"" + 366 "C-STORE SCU to AET \"" +
367 GetParameters().GetRemoteApplicationEntityTitle() + 367 GetParameters().GetRemoteModality().GetApplicationEntityTitle() +
368 "\" has failed with DIMSE status 0x" + buf); 368 "\" has failed with DIMSE status 0x" + buf);
369 } 369 }
370 } 370 }
371 371
372 372