Skip to content
Snippets Groups Projects
Commit e4fa5074 authored by Andreas Traczyk's avatar Andreas Traczyk
Browse files

manager: call gnutls_global_init/deinit on Windows

We use the ShiftMediaProject repo for gnutls and it seems the
initialization is still required on Windows. This commit prevents
the client from having to do it.

Change-Id: Id358a61fe6d0f2809d840a18978567dc309963d8
parent a63bd67f
No related branches found
No related tags found
No related merge requests found
...@@ -758,6 +758,10 @@ Manager::init(const std::string& config_file) ...@@ -758,6 +758,10 @@ Manager::init(const std::string& config_file)
JAMI_ERR("Unable to initialize git transport %s", error ? error->message : "(unknown)"); JAMI_ERR("Unable to initialize git transport %s", error ? error->message : "(unknown)");
} }
#if defined _MSC_VER
gnutls_global_init();
#endif
#ifndef WIN32 #ifndef WIN32
// Set the max number of open files. // Set the max number of open files.
struct rlimit nofiles; struct rlimit nofiles;
...@@ -918,6 +922,10 @@ Manager::finish() noexcept ...@@ -918,6 +922,10 @@ Manager::finish() noexcept
if (pimpl_->ioContextRunner_.joinable()) if (pimpl_->ioContextRunner_.joinable())
pimpl_->ioContextRunner_.join(); pimpl_->ioContextRunner_.join();
#if defined _MSC_VER
gnutls_global_deinit();
#endif
} catch (const VoipLinkException& err) { } catch (const VoipLinkException& err) {
JAMI_ERR("%s", err.what()); JAMI_ERR("%s", err.what());
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment