diff options
| author | Dan Goodliffe <dan@randomdan.homeip.net> | 2017-02-01 02:48:22 +0000 | 
|---|---|---|
| committer | Dan Goodliffe <dan@randomdan.homeip.net> | 2017-02-01 02:48:22 +0000 | 
| commit | 47a7029cd747de7ddd0108fcc163ecd11e1e8543 (patch) | |
| tree | 3240f339bcd799de1c909613ac8d5eb2bcf565a7 | |
| parent | Add service config file (diff) | |
| download | gentoobrowse-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.cpp | 15 | 
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"); | 
