From 6eafb8d4bbc9bfdd225723dbd1ed902d722c7f71 Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Wed, 7 Mar 2018 19:33:36 +0000 Subject: Use curl instead of libxml2's networking as we need more control over HTTP requests --- service/main.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'service/main.cpp') diff --git a/service/main.cpp b/service/main.cpp index 97bc89e..00563f4 100644 --- a/service/main.cpp +++ b/service/main.cpp @@ -2,10 +2,22 @@ #include #include #include "apiImpl.h" +#include +#include namespace MirrorSearch { class Api : public IceTray::Service { public: + Api() + { + xmlInitParser(); + curl_global_init(0); + } + ~Api() + { + xmlCleanupParser(); + curl_global_cleanup(); + } void addObjects(const std::string &, const Ice::CommunicatorPtr & ic, const Ice::StringSeq &, const Ice::ObjectAdapterPtr & adp) override { auto dbpool = getConnectionPool(ic, "postgresql", "MirrorSearch"); -- cgit v1.2.3