diff Odbc/Plugins/IndexPlugin.cpp @ 388:6aa19614ca20 db-protobuf

implemented protobuf for odbc
author Sebastien Jodogne <s.jodogne@gmail.com>
date Wed, 05 Apr 2023 11:14:10 +0200
parents 16aac0287485
children eb80f7c5e7d8
line wrap: on
line diff
--- a/Odbc/Plugins/IndexPlugin.cpp	Mon Apr 03 17:11:24 2023 +0200
+++ b/Odbc/Plugins/IndexPlugin.cpp	Wed Apr 05 11:14:10 2023 +0200
@@ -42,6 +42,9 @@
 #endif
 
 
+#include <google/protobuf/any.h>
+
+
 static const char* const KEY_ODBC = "Odbc";
 
 
@@ -54,6 +57,8 @@
   
   ORTHANC_PLUGINS_API int32_t OrthancPluginInitialize(OrthancPluginContext* context)
   {
+    GOOGLE_PROTOBUF_VERIFY_VERSION;
+
     if (!OrthancDatabases::InitializePlugin(context, "ODBC", true))
     {
       return -1;
@@ -130,6 +135,7 @@
   {
     LOG(WARNING) << "ODBC index is finalizing";
     OrthancDatabases::IndexBackend::Finalize();
+    google::protobuf::ShutdownProtobufLibrary();
   }