Mercurial > hg > orthanc
comparison OrthancFramework/Sources/DicomNetworking/DicomAssociation.cpp @ 4284:756126cd2219
moving all logs from DicomNetworking folder into the "dicom" category
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Wed, 04 Nov 2020 15:01:47 +0100 |
parents | 65086904ec45 |
children | 544120b34c09 |
comparison
equal
deleted
inserted
replaced
4283:6b58ceed959e | 4284:756126cd2219 |
---|---|
157 } | 157 } |
158 else | 158 else |
159 { | 159 { |
160 if (found->second.find(syntax) != found->second.end()) | 160 if (found->second.find(syntax) != found->second.end()) |
161 { | 161 { |
162 LOG(WARNING) << "The same transfer syntax (" | 162 CLOG(WARNING, DICOM) << "The same transfer syntax (" |
163 << GetTransferSyntaxUid(syntax) | 163 << GetTransferSyntaxUid(syntax) |
164 << ") was accepted twice for the same abstract syntax UID (" | 164 << ") was accepted twice for the same abstract syntax UID (" |
165 << abstractSyntax << ")"; | 165 << abstractSyntax << ")"; |
166 } | 166 } |
167 else | 167 else |
168 { | 168 { |
169 found->second[syntax] = presentationContextId; | 169 found->second[syntax] = presentationContextId; |
170 } | 170 } |
179 Close(); | 179 Close(); |
180 } | 180 } |
181 catch (OrthancException& e) | 181 catch (OrthancException& e) |
182 { | 182 { |
183 // Don't throw exception in destructors | 183 // Don't throw exception in destructors |
184 LOG(ERROR) << "Error while destroying a DICOM association: " << e.What(); | 184 CLOG(ERROR, DICOM) << "Error while destroying a DICOM association: " << e.What(); |
185 } | 185 } |
186 } | 186 } |
187 | 187 |
188 | 188 |
189 void DicomAssociation::SetRole(DicomAssociationRole role) | 189 void DicomAssociation::SetRole(DicomAssociationRole role) |
255 { | 255 { |
256 throw OrthancException(ErrorCode_BadSequenceOfCalls, | 256 throw OrthancException(ErrorCode_BadSequenceOfCalls, |
257 "No presentation context was proposed"); | 257 "No presentation context was proposed"); |
258 } | 258 } |
259 | 259 |
260 LOG(INFO) << "Opening a DICOM SCU connection from AET \"" | 260 CLOG(INFO, DICOM) << "Opening a DICOM SCU connection from AET \"" |
261 << parameters.GetLocalApplicationEntityTitle() | 261 << parameters.GetLocalApplicationEntityTitle() |
262 << "\" to AET \"" << parameters.GetRemoteModality().GetApplicationEntityTitle() | 262 << "\" to AET \"" << parameters.GetRemoteModality().GetApplicationEntityTitle() |
263 << "\" on host " << parameters.GetRemoteModality().GetHost() | 263 << "\" on host " << parameters.GetRemoteModality().GetHost() |
264 << ":" << parameters.GetRemoteModality().GetPortNumber() | 264 << ":" << parameters.GetRemoteModality().GetPortNumber() |
265 << " (manufacturer: " << EnumerationToString(parameters.GetRemoteModality().GetManufacturer()) << ")"; | 265 << " (manufacturer: " << EnumerationToString(parameters.GetRemoteModality().GetManufacturer()) << ")"; |
266 | 266 |
267 CheckConnecting(parameters, ASC_initializeNetwork(NET_REQUESTOR, 0, /*opt_acse_timeout*/ acseTimeout, &net_)); | 267 CheckConnecting(parameters, ASC_initializeNetwork(NET_REQUESTOR, 0, /*opt_acse_timeout*/ acseTimeout, &net_)); |
268 CheckConnecting(parameters, ASC_createAssociationParameters(¶ms_, /*opt_maxReceivePDULength*/ ASC_DEFAULTMAXPDU)); | 268 CheckConnecting(parameters, ASC_createAssociationParameters(¶ms_, /*opt_maxReceivePDULength*/ ASC_DEFAULTMAXPDU)); |
269 | 269 |
270 // Set this application's title and the called application's title in the params | 270 // Set this application's title and the called application's title in the params |
352 { | 352 { |
353 AddAccepted(pc->abstractSyntax, transferSyntax, pc->presentationContextID); | 353 AddAccepted(pc->abstractSyntax, transferSyntax, pc->presentationContextID); |
354 } | 354 } |
355 else | 355 else |
356 { | 356 { |
357 LOG(WARNING) << "Unknown transfer syntax received from AET \"" | 357 CLOG(WARNING, DICOM) << "Unknown transfer syntax received from AET \"" |
358 << parameters.GetRemoteModality().GetApplicationEntityTitle() | 358 << parameters.GetRemoteModality().GetApplicationEntityTitle() |
359 << "\": " << pc->acceptedTransferSyntax; | 359 << "\": " << pc->acceptedTransferSyntax; |
360 } | 360 } |
361 } | 361 } |
362 | 362 |
363 pc = (DUL_PRESENTATIONCONTEXT*) LST_Next(l); | 363 pc = (DUL_PRESENTATIONCONTEXT*) LST_Next(l); |
364 } | 364 } |
617 | 617 |
618 /** | 618 /** |
619 * Send the "EVENT_REPORT_RQ" request | 619 * Send the "EVENT_REPORT_RQ" request |
620 **/ | 620 **/ |
621 | 621 |
622 LOG(INFO) << "Reporting modality \"" | 622 CLOG(INFO, DICOM) << "Reporting modality \"" |
623 << parameters.GetRemoteModality().GetApplicationEntityTitle() | 623 << parameters.GetRemoteModality().GetApplicationEntityTitle() |
624 << "\" about storage commitment transaction: " << transactionUid | 624 << "\" about storage commitment transaction: " << transactionUid |
625 << " (" << successSopClassUids.size() << " successes, " | 625 << " (" << successSopClassUids.size() << " successes, " |
626 << failedSopClassUids.size() << " failures)"; | 626 << failedSopClassUids.size() << " failures)"; |
627 const DIC_US messageId = association.GetDcmtkAssociation().nextMsgID++; | 627 const DIC_US messageId = association.GetDcmtkAssociation().nextMsgID++; |
628 | 628 |
629 { | 629 { |
630 T_DIMSE_Message message; | 630 T_DIMSE_Message message; |
631 memset(&message, 0, sizeof(message)); | 631 memset(&message, 0, sizeof(message)); |
793 | 793 |
794 /** | 794 /** |
795 * Send the "N_ACTION_RQ" request | 795 * Send the "N_ACTION_RQ" request |
796 **/ | 796 **/ |
797 | 797 |
798 LOG(INFO) << "Request to modality \"" | 798 CLOG(INFO, DICOM) << "Request to modality \"" |
799 << parameters.GetRemoteModality().GetApplicationEntityTitle() | 799 << parameters.GetRemoteModality().GetApplicationEntityTitle() |
800 << "\" about storage commitment for " << sopClassUids.size() | 800 << "\" about storage commitment for " << sopClassUids.size() |
801 << " instances, with transaction UID: " << transactionUid; | 801 << " instances, with transaction UID: " << transactionUid; |
802 const DIC_US messageId = association.GetDcmtkAssociation().nextMsgID++; | 802 const DIC_US messageId = association.GetDcmtkAssociation().nextMsgID++; |
803 | 803 |
804 { | 804 { |
805 T_DIMSE_Message message; | 805 T_DIMSE_Message message; |
806 memset(&message, 0, sizeof(message)); | 806 memset(&message, 0, sizeof(message)); |