Mercurial > hg > orthanc-databases
diff SQLite/Plugins/IndexPlugin.cpp @ 381:9cde77ca9ad9 db-protobuf
initializing and finalizing protobuf
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Thu, 30 Mar 2023 21:16:57 +0200 |
parents | 16aac0287485 |
children | 3d6886f3e5b3 |
line wrap: on
line diff
--- a/SQLite/Plugins/IndexPlugin.cpp Thu Mar 30 17:08:00 2023 +0200 +++ b/SQLite/Plugins/IndexPlugin.cpp Thu Mar 30 21:16:57 2023 +0200 @@ -25,11 +25,15 @@ #include <Logging.h> +#include <google/protobuf/any.h> + extern "C" { ORTHANC_PLUGINS_API int32_t OrthancPluginInitialize(OrthancPluginContext* context) { + GOOGLE_PROTOBUF_VERIFY_VERSION; + if (!OrthancDatabases::InitializePlugin(context, "SQLite", true)) { return -1; @@ -84,6 +88,7 @@ { LOG(WARNING) << "SQLite index is finalizing"; OrthancDatabases::IndexBackend::Finalize(); + google::protobuf::ShutdownProtobufLibrary(); }