diff options
author | Remko Tronçon <git@el-tramo.be> | 2011-08-28 12:51:25 (GMT) |
---|---|---|
committer | Remko Tronçon <git@el-tramo.be> | 2011-08-28 12:51:25 (GMT) |
commit | 4d9d6d7148c8ff271d67196874c15d4b7ccef869 (patch) | |
tree | ea798720db4bcebf26415b23b0db8ddaa7a3633b /Swiften/Network | |
parent | 730b88ce48471842333b8769bcfc017335b0440f (diff) | |
download | swift-contrib-4d9d6d7148c8ff271d67196874c15d4b7ccef869.zip swift-contrib-4d9d6d7148c8ff271d67196874c15d4b7ccef869.tar.bz2 |
Call g_type_init before using gconf.
Resolves: #957
Diffstat (limited to 'Swiften/Network')
-rw-r--r-- | Swiften/Network/GConfProxyProvider.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/Swiften/Network/GConfProxyProvider.cpp b/Swiften/Network/GConfProxyProvider.cpp index 26de4d8..8d97c68 100644 --- a/Swiften/Network/GConfProxyProvider.cpp +++ b/Swiften/Network/GConfProxyProvider.cpp @@ -16,6 +16,13 @@ namespace Swift { GConfProxyProvider::GConfProxyProvider() { + // Ensure static GLib initialization methods are called + static bool glibInitialized = false; + if (!glibInitialized) { + g_type_init(); + glibInitialized = true; + } + socksProxy = getFromGConf("/system/proxy/socks_host", "/system/proxy/socks_port"); httpProxy = getFromGConf("/system/http_proxy/host", "/system/http_proxy/port"); SWIFT_LOG(debug) << "GConf: SOCKS5 => " << socksProxy.toString() << "; HTTP Connect => " << httpProxy.toString() << std::endl; |