diff MySQL/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/MySQL/Plugins/IndexPlugin.cpp	Thu Mar 30 17:08:00 2023 +0200
+++ b/MySQL/Plugins/IndexPlugin.cpp	Thu Mar 30 21:16:57 2023 +0200
@@ -28,11 +28,15 @@
 #include <Logging.h>
 #include <Toolbox.h>
 
+#include <google/protobuf/any.h>
+
 
 extern "C"
 {
   ORTHANC_PLUGINS_API int32_t OrthancPluginInitialize(OrthancPluginContext* context)
   {
+    GOOGLE_PROTOBUF_VERIFY_VERSION;
+
     if (!OrthancDatabases::InitializePlugin(context, "MySQL", true))
     {
       return -1;
@@ -93,6 +97,7 @@
     OrthancDatabases::MySQLDatabase::GlobalFinalization();
     Orthanc::HttpClient::GlobalFinalize();
     Orthanc::Toolbox::FinalizeOpenSsl();
+    google::protobuf::ShutdownProtobufLibrary();
   }