From 10814b044d0d3ab9b85afb64dfdb9abe6d2c1656 Mon Sep 17 00:00:00 2001 From: James Booth Date: Wed, 13 Jul 2016 01:06:03 +0100 Subject: [PATCH 1/3] Fix plugin install output --- src/command/cmd_funcs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/command/cmd_funcs.c b/src/command/cmd_funcs.c index 05de90a5..a4b53bf1 100644 --- a/src/command/cmd_funcs.c +++ b/src/command/cmd_funcs.c @@ -6062,7 +6062,7 @@ cmd_plugins(ProfWin *window, const char *const command, gchar **args) char *plugin_name = basename(filename); gboolean result = plugins_install(plugin_name, filename); if (result) { - cons_show("Plugin installed, use '/plugin load %s' to enable the plugin.", plugin_name); + cons_show("Plugin installed: %s", plugin_name); } else { cons_show("Failed to install plugin: %s", plugin_name); } From d4b3a05678d149051f5c2bbd49405b193b40778b Mon Sep 17 00:00:00 2001 From: James Booth Date: Mon, 18 Jul 2016 20:55:50 +0100 Subject: [PATCH 2/3] Use g_path_get_basename when installing plugin --- src/command/cmd_funcs.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/command/cmd_funcs.c b/src/command/cmd_funcs.c index a4b53bf1..d5f63846 100644 --- a/src/command/cmd_funcs.c +++ b/src/command/cmd_funcs.c @@ -6059,13 +6059,14 @@ cmd_plugins(ProfWin *window, const char *const command, gchar **args) return TRUE; } - char *plugin_name = basename(filename); + gchar *plugin_name = g_path_get_basename(filename); gboolean result = plugins_install(plugin_name, filename); if (result) { cons_show("Plugin installed: %s", plugin_name); } else { cons_show("Failed to install plugin: %s", plugin_name); } + g_free(plugin_name); return TRUE; } else if (g_strcmp0(args[0], "load") == 0) { From feb50ea41174af94d67332cd9baf95506e1483a7 Mon Sep 17 00:00:00 2001 From: James Booth Date: Mon, 18 Jul 2016 22:32:58 +0100 Subject: [PATCH 3/3] capabilities: use free instead of g_free --- src/xmpp/capabilities.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/xmpp/capabilities.c b/src/xmpp/capabilities.c index b4a6467b..7ba0565d 100644 --- a/src/xmpp/capabilities.c +++ b/src/xmpp/capabilities.c @@ -87,8 +87,8 @@ caps_init(void) g_key_file_load_from_file(cache, cache_loc, G_KEY_FILE_KEEP_COMMENTS, NULL); - jid_to_ver = g_hash_table_new_full(g_str_hash, g_str_equal, g_free, g_free); - jid_to_caps = g_hash_table_new_full(g_str_hash, g_str_equal, g_free, (GDestroyNotify)caps_destroy); + jid_to_ver = g_hash_table_new_full(g_str_hash, g_str_equal, free, free); + jid_to_caps = g_hash_table_new_full(g_str_hash, g_str_equal, free, (GDestroyNotify)caps_destroy); my_sha1 = NULL; }