NetworkManager r4147 - in trunk: . system-settings/src



Author: dcbw
Date: Mon Oct  6 16:03:57 2008
New Revision: 4147
URL: http://svn.gnome.org/viewvc/NetworkManager?rev=4147&view=rev

Log:
2008-10-03  Alexander Sack  <asac ubuntu com>

	* system-settings/src/main.c:
		- (add_default_dhcp_connection, device_removed_cb): ensure the UDI is
			always used as the hash key; fixes a crash when removing wired
			devices



Modified:
   trunk/ChangeLog
   trunk/system-settings/src/main.c

Modified: trunk/system-settings/src/main.c
==============================================================================
--- trunk/system-settings/src/main.c	(original)
+++ trunk/system-settings/src/main.c	Mon Oct  6 16:03:57 2008
@@ -382,7 +382,7 @@
 	return FALSE;
 
 ignore:
-	g_hash_table_remove (info->app->wired_devices, info);
+	g_hash_table_remove (info->app->wired_devices, info->udi);
 	return FALSE;
 }
 
@@ -407,13 +407,8 @@
 device_removed_cb (DBusGProxy *proxy, const char *udi, NMDeviceType devtype, gpointer user_data)
 {
 	Application *app = (Application *) user_data;
-	WiredDeviceInfo *info;
-
-	info = g_hash_table_lookup (app->wired_devices, udi);
-	if (!info)
-		return;
 
-	g_hash_table_remove (app->wired_devices, info);
+	g_hash_table_remove (app->wired_devices, udi);
 }
 
 /******************************************************************/



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]