# HG changeset patch # User Sebastien Jodogne # Date 1748599894 -7200 # Node ID cc5d783fccbbe6d91564a307490070ad75ec0198 # Parent 0b35221b1d44d973342f89a3778fab9cbb23da2d fix build against released versions of the Orthanc SDK diff -r 0b35221b1d44 -r cc5d783fccbb Framework/Plugins/IndexBackend.cpp --- a/Framework/Plugins/IndexBackend.cpp Wed May 28 15:26:15 2025 +0200 +++ b/Framework/Plugins/IndexBackend.cpp Fri May 30 12:11:34 2025 +0200 @@ -4250,12 +4250,16 @@ attachment->set_uuid(statement->ReadString(C3_STRING_1)); attachment->set_uncompressed_hash(statement->ReadString(C4_STRING_2)); attachment->set_compressed_hash(statement->ReadString(C5_STRING_3)); - attachment->set_custom_data(statement->ReadStringOrNull(C6_STRING_4)); + attachment->set_content_type(statement->ReadInteger32(C7_INT_1)); attachment->set_compression_type(statement->ReadInteger32(C9_INT_3)); attachment->set_compressed_size(statement->ReadInteger64(C10_BIG_INT_1)); attachment->set_uncompressed_size(statement->ReadInteger64(C11_BIG_INT_2)); +#if ORTHANC_PLUGINS_VERSION_IS_ABOVE(1, 12, 8) + attachment->set_custom_data(statement->ReadStringOrNull(C6_STRING_4)); +#endif + if (!statement->IsNull(C8_INT_2)) // revision can be null for files that have been atttached by older Orthanc versions { responses[internalId]->add_attachments_revisions(statement->ReadInteger32(C8_INT_2)); @@ -4352,11 +4356,14 @@ attachment->set_uuid(statement->ReadString(C3_STRING_1)); attachment->set_uncompressed_hash(statement->ReadString(C4_STRING_2)); attachment->set_compressed_hash(statement->ReadString(C5_STRING_3)); - attachment->set_custom_data(statement->ReadStringOrNull(C6_STRING_4)); attachment->set_content_type(statement->ReadInteger32(C7_INT_1)); attachment->set_compression_type(statement->ReadInteger32(C9_INT_3)); attachment->set_compressed_size(statement->ReadInteger64(C10_BIG_INT_1)); attachment->set_uncompressed_size(statement->ReadInteger64(C11_BIG_INT_2)); + +#if ORTHANC_PLUGINS_VERSION_IS_ABOVE(1, 12, 8) + attachment->set_custom_data(statement->ReadStringOrNull(C6_STRING_4)); +#endif }; break; default: