summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick Ohly <patrick.ohly@intel.com>2017-12-21 11:52:15 -0800
committerPatrick Ohly <patrick.ohly@intel.com>2018-01-09 07:53:27 -0800
commit2747426b7c3fedca30d28cc7549f8f828f2d24fc (patch)
treecc2eced7ad6f4b568118b423c954873da1b7ebce
parent1126b65b6ab2d6fa6e110fc3309edb52398a3918 (diff)
oauth2.cpp: fix usage of curl
When libcurl was selected instead of libsoup, compilation failed because the necessary header file was missing and the direct assignment of a plain pointer to the shared_ptr failed. Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
-rw-r--r--src/backends/oauth2/oauth2.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/backends/oauth2/oauth2.cpp b/src/backends/oauth2/oauth2.cpp
index b19735fa..47d0bc18 100644
--- a/src/backends/oauth2/oauth2.cpp
+++ b/src/backends/oauth2/oauth2.cpp
@@ -23,6 +23,7 @@
#include <syncevo/GLibSupport.h>
#include <syncevo/GVariantSupport.h>
#include <syncevo/SoupTransportAgent.h>
+#include <syncevo/CurlTransportAgent.h>
#include <json.h>
#include <syncevo/declarations.h>
@@ -56,7 +57,8 @@ public:
#ifdef ENABLE_LIBSOUP
m_agent = SoupTransportAgent::create(static_cast<GMainLoop *>(NULL));
#elif defined(ENABLE_LIBCURL)
- m_agent = new CurlTransportAgent();
+ boost::shared_ptr<CurlTransportAgent> agent(new CurlTransportAgent());
+ m_agent = agent;
#endif
}