/* Check whether all group members have been probed */
- if (g->status != FLX_ENTRY_GROUP_REGISTERING || g->n_probing > 0)
+ if (g->state != FLX_ENTRY_GROUP_REGISTERING || g->n_probing > 0)
return;
- flx_entry_group_run_callback(g, g->status = FLX_ENTRY_GROUP_ESTABLISHED);
+ flx_entry_group_change_state(g, FLX_ENTRY_GROUP_ESTABLISHED);
if (g->dead)
return;
static void next_state(flxAnnouncement *a) {
g_assert(a);
- g_message("%i -- %u", a->state, a->n_iteration);
+/* g_message("%i -- %u", a->state, a->n_iteration); */
if (a->state == FLX_WAITING) {
a->entry->group->n_probing--;
}
- if (a->entry->group && a->entry->group->status == FLX_ENTRY_GROUP_REGISTERING)
+ if (a->entry->group && a->entry->group->state == FLX_ENTRY_GROUP_REGISTERING)
a->state = FLX_WAITING;
else {
a->state = FLX_ANNOUNCING;
a->state = FLX_PROBING;
else if (!(e->flags & FLX_ENTRY_NOANNOUNCE)) {
- if (!e->group || e->group->status == FLX_ENTRY_GROUP_ESTABLISHED)
+ if (!e->group || e->group->state == FLX_ENTRY_GROUP_ESTABLISHED)
a->state = FLX_ANNOUNCING;
else
a->state = FLX_WAITING;
}
static flxRecord *make_goodbye_record(flxRecord *r) {
- gchar *t;
+/* gchar *t; */
flxRecord *g;
g_assert(r);
- g_message("Preparing goodbye for record [%s]", t = flx_record_to_string(r));
- g_free(t);
+/* g_message("Preparing goodbye for record [%s]", t = flx_record_to_string(r)); */
+/* g_free(t); */
g = flx_record_copy(r);
g_assert(g->ref == 1);
g_assert(s);
g_assert(i);
- g_message("goodbye interface: %s.%u", i->hardware->name, i->protocol);
+/* g_message("goodbye interface: %s.%u", i->hardware->name, i->protocol); */
if (goodbye && flx_interface_relevant(i)) {
flxEntry *e;
while (i->announcements)
remove_announcement(s, i->announcements);
- g_message("goodbye interface done: %s.%u", i->hardware->name, i->protocol);
+/* g_message("goodbye interface done: %s.%u", i->hardware->name, i->protocol); */
}
void flx_goodbye_entry(flxServer *s, flxEntry *e, gboolean goodbye) {
g_assert(s);
g_assert(e);
- g_assert(!e->dead);
- g_message("goodbye entry: %p", e);
+/* g_message("goodbye entry: %p", e); */
- if (goodbye)
+ if (goodbye && !e->dead)
flx_interface_monitor_walk(s->monitor, 0, AF_UNSPEC, send_goodbye_callback, e);
while (e->announcements)
remove_announcement(s, e->announcements);
- g_message("goodbye entry done: %p", e);
+/* g_message("goodbye entry done: %p", e); */
}
g_assert(s);
- g_message("goodbye all");
+/* g_message("goodbye all"); */
for (e = s->entries; e; e = e->entries_next)
if (!e->dead)
flx_goodbye_entry(s, e, goodbye);
- g_message("goodbye all done");
+/* g_message("goodbye all done"); */
}