changeset 2963:800b4daa6dab

fix
author Sebastien Jodogne <s.jodogne@gmail.com>
date Wed, 05 Dec 2018 09:19:34 +0100
parents 792a65fdd94b
children 6896a7c1cbe2
files Plugins/Samples/Common/OrthancPluginConnection.cpp Plugins/Samples/Common/OrthancPluginConnection.h
diffstat 2 files changed, 5 insertions(+), 13 deletions(-) [+]
line wrap: on
line diff
--- a/Plugins/Samples/Common/OrthancPluginConnection.cpp	Tue Dec 04 19:01:00 2018 +0100
+++ b/Plugins/Samples/Common/OrthancPluginConnection.cpp	Wed Dec 05 09:19:34 2018 +0100
@@ -40,7 +40,7 @@
   void OrthancPluginConnection::RestApiGet(std::string& result,
                                            const std::string& uri) 
   {
-    OrthancPlugins::MemoryBuffer buffer(context_);
+    OrthancPlugins::MemoryBuffer buffer;
 
     if (buffer.RestApiGet(uri, false))
     {
@@ -57,7 +57,7 @@
                                             const std::string& uri,
                                             const std::string& body)
   {
-    OrthancPlugins::MemoryBuffer buffer(context_);
+    OrthancPlugins::MemoryBuffer buffer;
 
     if (buffer.RestApiPost(uri, body.c_str(), body.size(), false))
     {
@@ -74,7 +74,7 @@
                                            const std::string& uri,
                                            const std::string& body)
   {
-    OrthancPlugins::MemoryBuffer buffer(context_);
+    OrthancPlugins::MemoryBuffer buffer;
 
     if (buffer.RestApiPut(uri, body.c_str(), body.size(), false))
     {
@@ -89,9 +89,9 @@
 
   void OrthancPluginConnection::RestApiDelete(const std::string& uri)
   {
-    OrthancPlugins::MemoryBuffer buffer(context_);
+    OrthancPlugins::MemoryBuffer buffer;
 
-    if (!::OrthancPlugins::RestApiDelete(context_, uri, false))
+    if (!::OrthancPlugins::RestApiDelete(uri, false))
     {
       ORTHANC_PLUGINS_THROW_EXCEPTION(UnknownResource);
     }
--- a/Plugins/Samples/Common/OrthancPluginConnection.h	Tue Dec 04 19:01:00 2018 +0100
+++ b/Plugins/Samples/Common/OrthancPluginConnection.h	Wed Dec 05 09:19:34 2018 +0100
@@ -42,15 +42,7 @@
   // This class is thread-safe
   class OrthancPluginConnection : public IOrthancConnection
   {
-  private:
-    OrthancPluginContext*   context_;
-
   public:
-    OrthancPluginConnection(OrthancPluginContext* context) :
-    context_(context)
-    {
-    }
-
     virtual void RestApiGet(std::string& result,
                             const std::string& uri);