summaryrefslogtreecommitdiff
path: root/src/plugin-loader.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugin-loader.c')
-rw-r--r--src/plugin-loader.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/src/plugin-loader.c b/src/plugin-loader.c
index d308437ee..392715966 100644
--- a/src/plugin-loader.c
+++ b/src/plugin-loader.c
@@ -89,13 +89,18 @@ plugin_loader_try_to_load (
}
else
{
- gchar *sidecars = g_strjoinv (", ",
- (gchar **) gabble_plugin_get_sidecar_interfaces (plugin));
+ const gchar * const *interfaces = gabble_plugin_get_sidecar_interfaces (plugin);
const gchar *version = gabble_plugin_get_version (plugin);
+ gchar *sidecars;
if (version == NULL)
version = "(unspecified)";
+ if (interfaces != NULL)
+ sidecars = g_strjoinv (", ", (gchar **) interfaces);
+ else
+ sidecars = g_strdup ("none (maybe it implements some channels instead?)");
+
DEBUG ("loaded '%s' version %s (%s), implementing these sidecars: %s",
gabble_plugin_get_name (plugin), version, path, sidecars);
@@ -108,7 +113,6 @@ plugin_loader_try_to_load (
static void
gabble_plugin_loader_probe (GabblePluginLoader *self)
{
- GError *error = NULL;
const gchar *directory_names = g_getenv ("GABBLE_PLUGIN_DIR");
gchar **dir_array;
gchar **ptr;
@@ -132,13 +136,15 @@ gabble_plugin_loader_probe (GabblePluginLoader *self)
for (ptr = dir_array ; *ptr != NULL ; ptr++)
{
+ GError *error = NULL;
+
DEBUG ("probing %s", *ptr);
d = g_dir_open (*ptr, 0, &error);
if (d == NULL)
{
DEBUG ("%s", error->message);
- g_error_free (error);
+ g_clear_error (&error);
continue;
}