comparison OrthancServer/Sources/ServerContext.cpp @ 4760:b2417ac5055a openssl-3.x

integration mainline->openssl-3.x
author Sebastien Jodogne <s.jodogne@gmail.com>
date Wed, 21 Jul 2021 10:48:14 +0200
parents f0038043fb97 2f35e6b765e5
children 70d2a97ca8cb
comparison
equal deleted inserted replaced
4750:56ed4c11fc2a 4760:b2417ac5055a
1160 CompressionType compression = (compressionEnabled_ ? CompressionType_ZlibWithSize : CompressionType_None); 1160 CompressionType compression = (compressionEnabled_ ? CompressionType_ZlibWithSize : CompressionType_None);
1161 1161
1162 StorageAccessor accessor(area_, GetMetricsRegistry()); 1162 StorageAccessor accessor(area_, GetMetricsRegistry());
1163 FileInfo attachment = accessor.Write(data, size, attachmentType, compression, storeMD5_); 1163 FileInfo attachment = accessor.Write(data, size, attachmentType, compression, storeMD5_);
1164 1164
1165 StoreStatus status = index_.AddAttachment( 1165 try
1166 newRevision, attachment, resourceId, hasOldRevision, oldRevision, oldMD5); 1166 {
1167 if (status != StoreStatus_Success) 1167 StoreStatus status = index_.AddAttachment(
1168 { 1168 newRevision, attachment, resourceId, hasOldRevision, oldRevision, oldMD5);
1169 if (status != StoreStatus_Success)
1170 {
1171 accessor.Remove(attachment);
1172 return false;
1173 }
1174 else
1175 {
1176 return true;
1177 }
1178 }
1179 catch (OrthancException&)
1180 {
1181 // Fixed in Orthanc 1.9.6
1169 accessor.Remove(attachment); 1182 accessor.Remove(attachment);
1170 return false; 1183 throw;
1171 }
1172 else
1173 {
1174 return true;
1175 } 1184 }
1176 } 1185 }
1177 1186
1178 1187
1179 bool ServerContext::DeleteResource(Json::Value& remainingAncestor, 1188 bool ServerContext::DeleteResource(Json::Value& remainingAncestor,