network: Simplify helper function
This commit is contained in:
parent
f03ae7ff93
commit
75b4e5e061
5 changed files with 18 additions and 25 deletions
|
@ -143,15 +143,15 @@ add_details (GtkWidget *details, NMDevice *device, NMConnection *connection)
|
|||
NMIPConfig *ip4_config = NULL;
|
||||
NMIPConfig *ip6_config = NULL;
|
||||
g_autofree gchar *ip4_address = NULL;
|
||||
g_autofree gchar *ip4_route = NULL;
|
||||
const gchar *ip4_route = NULL;
|
||||
g_autofree gchar *ip4_dns = NULL;
|
||||
g_autofree gchar *ip6_address = NULL;
|
||||
gint i = 0;
|
||||
|
||||
ip4_config = nm_device_get_ip4_config (device);
|
||||
if (ip4_config) {
|
||||
ip4_address = panel_get_ip4_address_as_string (ip4_config, "address");
|
||||
ip4_route = panel_get_ip4_address_as_string (ip4_config, "gateway");
|
||||
ip4_address = panel_get_ip4_address_as_string (ip4_config);
|
||||
ip4_route = nm_ip_config_get_gateway (ip4_config);
|
||||
ip4_dns = panel_get_ip4_dns_as_string (ip4_config);
|
||||
}
|
||||
ip6_config = nm_device_get_ip6_config (device);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue