Mercurial > hg > orthanc
comparison OrthancServer/Sources/OrthancRestApi/OrthancRestAnonymizeModify.cpp @ 4819:70d2a97ca8cb openssl-3.x
integration mainline->openssl-3.x
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Thu, 25 Nov 2021 13:12:32 +0100 |
parents | 61da49321754 94616af363ec |
children | 2e71a08eea15 |
comparison
equal
deleted
inserted
replaced
4785:61da49321754 | 4819:70d2a97ca8cb |
---|---|
540 { | 540 { |
541 std::unique_ptr<DicomInstanceToStore> toStore(DicomInstanceToStore::CreateFromParsedDicomFile(dicom)); | 541 std::unique_ptr<DicomInstanceToStore> toStore(DicomInstanceToStore::CreateFromParsedDicomFile(dicom)); |
542 toStore->SetOrigin(DicomInstanceOrigin::FromRest(call)); | 542 toStore->SetOrigin(DicomInstanceOrigin::FromRest(call)); |
543 | 543 |
544 ServerContext& context = OrthancRestApi::GetContext(call); | 544 ServerContext& context = OrthancRestApi::GetContext(call); |
545 StoreStatus status = context.Store(id, *toStore, StoreInstanceMode_Default); | 545 ServerContext::StoreResult result = context.Store(id, *toStore, StoreInstanceMode_Default); |
546 | 546 |
547 if (status == StoreStatus_Failure) | 547 if (result.GetStatus() == StoreStatus_Failure) |
548 { | 548 { |
549 throw OrthancException(ErrorCode_CannotStoreInstance); | 549 throw OrthancException(ErrorCode_CannotStoreInstance); |
550 } | 550 } |
551 | 551 |
552 if (sendAnswer) | 552 if (sendAnswer) |
553 { | 553 { |
554 OrthancRestApi::GetApi(call).AnswerStoredInstance(call, *toStore, status, id); | 554 OrthancRestApi::GetApi(call).AnswerStoredInstance(call, *toStore, result.GetStatus(), id); |
555 } | 555 } |
556 } | 556 } |
557 | 557 |
558 | 558 |
559 static void CreateDicomV1(ParsedDicomFile& dicom, | 559 static void CreateDicomV1(ParsedDicomFile& dicom, |