Fix duplicate Default printouts

git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3760 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
This commit is contained in:
Dan Williams 2008-06-20 15:08:09 +00:00
parent 2046ec13e3
commit ebaee3a388

View file

@ -206,6 +206,7 @@ detail_device (gpointer data, gpointer user_data)
const GArray *array;
const GPtrArray *connections;
int j;
gboolean is_default = FALSE;
state = nm_device_get_state (device);
@ -237,11 +238,14 @@ detail_device (gpointer data, gpointer user_data)
candidate_dev = g_ptr_array_index (devices, 0);
if ((candidate_dev == device) && nm_active_connection_get_default(candidate))
print_string ("Default", "yes");
else
print_string ("Default", "no");
is_default = TRUE;
}
if (is_default)
print_string ("Default", "yes");
else
print_string ("Default", "no");
tmp = NULL;
if (NM_IS_DEVICE_ETHERNET (device))
tmp = g_strdup (nm_device_ethernet_get_hw_address (NM_DEVICE_ETHERNET (device)));