route-manager: fix timeout for cleanup device-route monitoring

The timeout was wrongly set to a huge number, and would never hit.
This leaked some data, that we could instead clean up. It's not
serious however.
This commit is contained in:
Thomas Haller 2017-07-12 08:24:43 +02:00
parent c528a89519
commit 824c8aba3d

View file

@ -33,7 +33,7 @@
* up, we delete it. */
#define IP4_DEVICE_ROUTES_WAIT_TIME_NS (NM_UTILS_NS_PER_SECOND / 2)
#define IP4_DEVICE_ROUTES_GC_INTERVAL_SEC (IP4_DEVICE_ROUTES_WAIT_TIME_NS * 2)
#define IP4_DEVICE_ROUTES_GC_INTERVAL_MSEC ((IP4_DEVICE_ROUTES_WAIT_TIME_NS / 1000000) * 3)
/*****************************************************************************/
@ -1227,7 +1227,7 @@ nm_route_manager_ip4_route_register_device_route_purge_list (NMRouteManager *sel
}
if (priv->ip4_device_routes.gc_id == 0) {
g_signal_connect (priv->platform, NM_PLATFORM_SIGNAL_IP4_ROUTE_CHANGED, G_CALLBACK (_ip4_device_routes_ip4_route_changed), self);
priv->ip4_device_routes.gc_id = g_timeout_add (IP4_DEVICE_ROUTES_GC_INTERVAL_SEC, (GSourceFunc) _ip4_device_routes_gc, self);
priv->ip4_device_routes.gc_id = g_timeout_add (IP4_DEVICE_ROUTES_GC_INTERVAL_MSEC, (GSourceFunc) _ip4_device_routes_gc, self);
}
}