[vinagre] Make sure vinagre_connection_split_string() returns protocol as NULL if failed.
- From: Jonh Wendell <jwendell src gnome org>
- To: svn-commits-list gnome org
- Subject: [vinagre] Make sure vinagre_connection_split_string() returns protocol as NULL if failed.
- Date: Mon, 27 Jul 2009 12:04:07 +0000 (UTC)
commit 32b327b3beb7420d3199b7a845b19ce1f557a6bd
Author: Jonh Wendell <jwendell gnome org>
Date: Fri Jul 24 09:35:38 2009 -0300
Make sure vinagre_connection_split_string() returns protocol as NULL if failed.
Also, use the new function to get a plugin given a protocol, instead of
use g_hash_table_lookup() directly.
vinagre/vinagre-connection.c | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/vinagre/vinagre-connection.c b/vinagre/vinagre-connection.c
index 1daa392..769a3c4 100644
--- a/vinagre/vinagre-connection.c
+++ b/vinagre/vinagre-connection.c
@@ -532,12 +532,13 @@ vinagre_connection_split_string (const gchar *uri,
lhost = (gchar *) uri;
}
- plugin = g_hash_table_lookup (vinagre_plugin_engine_get_plugins_by_protocol (vinagre_plugins_engine_get_default ()),
- *protocol);
+ plugin = vinagre_plugins_engine_get_plugin_by_protocol (vinagre_plugins_engine_get_default (),
+ *protocol);
if (!plugin)
{
*error_msg = g_strdup_printf (_("The protocol %s is not supported."), *protocol);
g_free (*protocol);
+ *protocol = NULL;
g_strfreev (url);
return FALSE;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]