diff options
author | Dan Goodliffe <dan@randomdan.homeip.net> | 2018-03-07 19:33:36 +0000 |
---|---|---|
committer | Dan Goodliffe <dan@randomdan.homeip.net> | 2018-03-07 19:33:36 +0000 |
commit | 6eafb8d4bbc9bfdd225723dbd1ed902d722c7f71 (patch) | |
tree | 2b11754eede3d672d47310645db9f023131497a5 /service/main.cpp | |
parent | Store parser flags in service config (diff) | |
download | mirrorsearch-6eafb8d4bbc9bfdd225723dbd1ed902d722c7f71.tar.bz2 mirrorsearch-6eafb8d4bbc9bfdd225723dbd1ed902d722c7f71.tar.xz mirrorsearch-6eafb8d4bbc9bfdd225723dbd1ed902d722c7f71.zip |
Use curl instead of libxml2's networking as we need more control over HTTP requests
Diffstat (limited to 'service/main.cpp')
-rw-r--r-- | service/main.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
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 <Ice/ObjectAdapter.h> #include <icetrayService.h> #include "apiImpl.h" +#include <curl/curl.h> +#include <libxml/parser.h> 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"); |