static guint timer_ra;
static char *default_interface;
static GSList *prefixes;
-static GHashTable *timer_hash;
static void *rs_context;
static int setup_prefix_delegation(struct connman_service *service);
if (!default_interface)
DBG("No uplink connection, retrying prefix delegation");
- ret = setup_prefix_delegation(__connman_service_get_default());
+ ret = setup_prefix_delegation(connman_service_get_default());
if (ret < 0 && ret != -EINPROGRESS)
return TRUE; /* delegation error, try again */
if (status == CONNMAN_DHCPV6_STATUS_SUCCEED)
dhcpv6_callback(network, status, data);
else
- setup_prefix_delegation(__connman_service_get_default());
+ setup_prefix_delegation(connman_service_get_default());
}
static void cleanup(void)
timer_uplink = 0;
}
- g_hash_table_destroy(timer_hash);
- timer_hash = NULL;
-
if (prefixes) {
g_slist_free_full(prefixes, g_free);
prefixes = NULL;
return err;
}
-static void cleanup_timer(gpointer user_data)
-{
- guint timer = GPOINTER_TO_UINT(user_data);
-
- g_source_remove(timer);
-}
-
static void update_default_interface(struct connman_service *service)
{
setup_prefix_delegation(service);
static void update_ipconfig(struct connman_service *service,
struct connman_ipconfig *ipconfig)
{
- if (!service || service != __connman_service_get_default())
+ if (!service || service != connman_service_get_default())
return;
if (ipconfig != __connman_service_get_ip6config(service))
}
}
-static struct connman_notifier pd_notifier = {
+static const struct connman_notifier pd_notifier = {
.name = "IPv6 prefix delegation",
.default_changed = update_default_interface,
.ipconfig_changed = update_ipconfig,
bridge_index = connman_inet_ifindex(bridge);
- timer_hash = g_hash_table_new_full(g_direct_hash, g_direct_equal,
- NULL, cleanup_timer);
-
err = __connman_inet_ipv6_start_recv_rs(bridge_index, rs_received,
NULL, &rs_context);
if (err < 0)
DBG("Cannot receive router solicitation %d/%s",
err, strerror(-err));
- service = __connman_service_get_default();
+ service = connman_service_get_default();
if (service) {
/*
* We have an uplink connection already, try to use it.