/soc/2013/ankitkv/gobjectification: c55849ed482d: Make sure purp...
Ankit Vani
a at nevitus.org
Mon Sep 23 13:53:50 EDT 2013
Changeset: c55849ed482d4ccca0ec145ce2313353139e1c5a
Author: Ankit Vani <a at nevitus.org>
Date: 2013-09-23 22:56 +0530
Branch: soc.2013.gobjectification.plugins
URL: https://hg.pidgin.im/soc/2013/ankitkv/gobjectification/rev/c55849ed482d
Description:
Make sure purple_plugins_find_all() returns only purple plugins
diffstat:
libpurple/keyring.c | 3 ---
libpurple/plugins.c | 11 ++++++-----
libpurple/plugins/ssl/ssl.c | 2 --
pidgin/gtkdialogs.c | 2 --
4 files changed, 6 insertions(+), 12 deletions(-)
diffs (65 lines):
diff --git a/libpurple/keyring.c b/libpurple/keyring.c
--- a/libpurple/keyring.c
+++ b/libpurple/keyring.c
@@ -1289,9 +1289,6 @@ purple_keyring_init(void)
PurplePlugin *plugin = PURPLE_PLUGIN(it->data);
PurplePluginInfo *info = purple_plugin_get_info(plugin);
- if (info == NULL)
- continue;
-
if (strncmp(purple_plugin_info_get_id(info), "keyring-", 8) != 0)
continue;
diff --git a/libpurple/plugins.c b/libpurple/plugins.c
--- a/libpurple/plugins.c
+++ b/libpurple/plugins.c
@@ -799,8 +799,12 @@ purple_plugins_find_all(void)
for (l = ids; l; l = l->next) {
plugins = gplugin_plugin_manager_find_plugins(l->data);
- for (ll = plugins; ll; ll = ll->next)
- ret = g_list_append(ret, ll->data);
+
+ for (ll = plugins; ll; ll = ll->next) {
+ PurplePlugin *plugin = PURPLE_PLUGIN(ll->data);
+ if (purple_plugin_get_info(plugin))
+ ret = g_list_append(ret, plugin);
+ }
gplugin_plugin_manager_free_plugin_list(plugins);
}
@@ -849,9 +853,6 @@ purple_plugins_refresh(void)
continue;
info = purple_plugin_get_info(plugin);
- if (!info)
- continue;
-
priv = PURPLE_PLUGIN_INFO_GET_PRIVATE(info);
if (!priv->unloaded && purple_plugin_info_get_flags(info) &
diff --git a/libpurple/plugins/ssl/ssl.c b/libpurple/plugins/ssl/ssl.c
--- a/libpurple/plugins/ssl/ssl.c
+++ b/libpurple/plugins/ssl/ssl.c
@@ -48,8 +48,6 @@ probe_ssl_plugins(PurplePlugin *my_plugi
continue;
info = purple_plugin_get_info(plugin);
- if (!info)
- continue;
if (strncmp(purple_plugin_info_get_id(info), "ssl-", 4) == 0)
{
diff --git a/pidgin/gtkdialogs.c b/pidgin/gtkdialogs.c
--- a/pidgin/gtkdialogs.c
+++ b/pidgin/gtkdialogs.c
@@ -847,8 +847,6 @@ void pidgin_dialogs_plugins_info(void)
for(l = plugins; l; l = l->next) {
plugin = PURPLE_PLUGIN(l->data);
info = purple_plugin_get_info(plugin);
- if (!info)
- continue;
pname = g_markup_escape_text(purple_plugin_info_get_name(info), -1);
authorlist = purple_plugin_info_get_authors(info);
More information about the Commits
mailing list