tui: fix route editing (rh #1090422)

NmtRouteTable's ip4-routes and ip6-routes properties have the
D-Bus-based route list types (like the corresponding NMSetting
properties) so we have to convert our GSList-of-NMIP[46]Route data
into those types when updating the property.

https://bugzilla.gnome.org/show_bug.cgi?id=728958
This commit is contained in:
Dan Winship 2014-04-25 11:01:21 -04:00
parent b77b7510d6
commit 7f5b2f81b0

View file

@ -119,7 +119,14 @@ route_list_transform_from_route (GBinding *binding,
nm_ip6_route_unref (nth->data);
}
nth->data = g_value_dup_boxed (source_value);
g_value_take_boxed (target_value, routes);
if (priv->family == AF_INET) {
nm_utils_ip4_routes_to_gvalue (routes, target_value);
g_slist_free_full (routes, (GDestroyNotify) nm_ip4_route_unref);
} else if (priv->family == AF_INET6) {
nm_utils_ip6_routes_to_gvalue (routes, target_value);
g_slist_free_full (routes, (GDestroyNotify) nm_ip6_route_unref);
}
return TRUE;
}