- g_hash_table_remove(l->hash_table, &a->address);
- else if (change == FLX_INTERFACE_NEW)
- add_addr(l, a);
+ remove_addr(l, a);
+ else
+ handle_addr(l, a);
+}
+
+/* Called whenever a new interface becomes available, is changed or removed on the local machine */
+static void interface_callback(flxInterfaceMonitor *m, flxInterfaceChange change, const flxInterface *i, gpointer userdata) {
+ flxLocalAddrSource *l = userdata;
+ g_assert(m);
+ g_assert(i);
+ g_assert(l);
+
+ if (change == FLX_INTERFACE_CHANGE) {
+ flxInterfaceAddress *a;
+
+ for (a = i->addresses; a; a = a->next)
+ handle_addr(l, a);
+ }