comparison src/sslconn.c @ 7863:6ee2fe9bb74e

[gaim-migrate @ 8517] "Patch 2: ssl-plugins.patch Other plugins might need to use the NSS/GNUTLS libraries, which shouldn't be initialized multiple times in the same thread (at least NSS says this is a bad thing to do). This patch enables other plugins to load either the NSS or GNUTLS plugin, and a) have them init on load, rather when sslconn inits them b) have them not stomp on each other if the other one has already loaded." --Bill Tompkins (obobo) committer: Tailor Script <tailor@pidgin.im>
author Luke Schierer <lschiere@pidgin.im>
date Sun, 14 Dec 2003 16:46:28 +0000
parents ef0684dfdf74
children fa6395637e2c
comparison
equal deleted inserted replaced
7862:01e6e9c46a01 7863:6ee2fe9bb74e
30 30
31 static gboolean 31 static gboolean
32 ssl_init(void) 32 ssl_init(void)
33 { 33 {
34 GaimPlugin *plugin; 34 GaimPlugin *plugin;
35 GaimSslOps *ops = gaim_ssl_get_ops(); 35 GaimSslOps *ops;
36 gboolean success = FALSE;
37 36
38 if (_ssl_initialized) 37 if (_ssl_initialized)
39 return FALSE; 38 return FALSE;
40 39
41 plugin = gaim_plugins_find_with_id("core-ssl"); 40 plugin = gaim_plugins_find_with_id("core-ssl");
42 41
43 if (plugin != NULL && !gaim_plugin_is_loaded(plugin)) 42 if (plugin != NULL && !gaim_plugin_is_loaded(plugin))
44 gaim_plugin_load(plugin); 43 gaim_plugin_load(plugin);
45 44
45 ops = gaim_ssl_get_ops();
46 if (ops != NULL && ops->init != NULL) 46 if (ops != NULL && ops->init != NULL)
47 success = ops->init(); 47 return ops->init();
48 48 else
49 _ssl_initialized = success; 49 return FALSE;
50
51 return success;
52 } 50 }
53 51
54 gboolean 52 gboolean
55 gaim_ssl_is_supported(void) 53 gaim_ssl_is_supported(void)
56 { 54 {