summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2017-02-01 02:48:22 +0000
committerDan Goodliffe <dan@randomdan.homeip.net>2017-02-01 02:48:22 +0000
commit47a7029cd747de7ddd0108fcc163ecd11e1e8543 (patch)
tree3240f339bcd799de1c909613ac8d5eb2bcf565a7
parentAdd service config file (diff)
downloadgentoobrowse-api-47a7029cd747de7ddd0108fcc163ecd11e1e8543.tar.bz2
gentoobrowse-api-47a7029cd747de7ddd0108fcc163ecd11e1e8543.tar.xz
gentoobrowse-api-47a7029cd747de7ddd0108fcc163ecd11e1e8543.zip
Add explicit init and clean up of XML/XSLT things with the API instance
-rw-r--r--gentoobrowse-api/service/main.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/gentoobrowse-api/service/main.cpp b/gentoobrowse-api/service/main.cpp
index b7b18a2..8ac8a8b 100644
--- a/gentoobrowse-api/service/main.cpp
+++ b/gentoobrowse-api/service/main.cpp
@@ -7,10 +7,25 @@
#include "notificationsimpl.h"
#include "mailserverimpl.h"
+#include <libexslt/exslt.h>
+#include <libxslt/transform.h>
+
namespace Gentoo {
namespace Service {
class Api : public IceTray::Service {
public:
+ Api()
+ {
+ xmlInitParser();
+ // exsltRegisterAll();
+ }
+
+ ~Api()
+ {
+ xsltCleanupGlobals();
+ xmlCleanupParser();
+ }
+
void addObjects(const std::string &, const Ice::CommunicatorPtr & ic, const Ice::StringSeq &, const Ice::ObjectAdapterPtr & adp) override
{
auto db = getConnectionPool(ic, "postgresql", "GentooBrowseAPI");