libpurple/plugins/ssl/ssl.c

branch
soc.2013.gobjectification.plugins
changeset 36509
86e882c3cfdf
parent 36505
60c161851325
child 36642
b8ba53daa445
--- a/libpurple/plugins/ssl/ssl.c	Sun Aug 11 18:55:41 2013 +0530
+++ b/libpurple/plugins/ssl/ssl.c	Sun Aug 11 19:25:33 2013 +0530
@@ -50,7 +50,7 @@
 		if (strncmp(purple_plugin_info_get_id(purple_plugin_get_info(plugin)),
 				"ssl-", 4) == 0)
 		{
-			if (purple_plugin_is_loaded(plugin) || purple_plugin_load(plugin))
+			if (purple_plugin_load(plugin, NULL))
 			{
 				ssl_plugin = plugin;
 
@@ -63,7 +63,7 @@
 
 	if (ssl_plugin == NULL) {
 		g_set_error(error, SSL_PLUGIN_DOMAIN, 0,
-				"Could not find a plugin that implements SSL.");
+				"Could not load a plugin that implements SSL.");
 		return FALSE;
 	} else {
 		return TRUE;
@@ -100,7 +100,8 @@
 	if (ssl_plugin != NULL &&
 		g_list_find(purple_plugins_get_loaded(), ssl_plugin) != NULL)
 	{
-		purple_plugin_unload(ssl_plugin);
+		if (!purple_plugin_unload(ssl_plugin, error))
+			return FALSE;
 	}
 
 	ssl_plugin = NULL;

mercurial