diff options
| -rw-r--r-- | avahi-core/server.c | 16 | ||||
| -rw-r--r-- | avahi-core/server.h | 2 | ||||
| -rw-r--r-- | docs/TODO | 5 | 
3 files changed, 20 insertions, 3 deletions
diff --git a/avahi-core/server.c b/avahi-core/server.c index 49821d8..cdf31e8 100644 --- a/avahi-core/server.c +++ b/avahi-core/server.c @@ -2274,6 +2274,22 @@ void avahi_s_entry_group_change_state(AvahiSEntryGroup *g, AvahiEntryGroupState      assert(state <= AVAHI_ENTRY_GROUP_COLLISION); +    if (g->state == AVAHI_ENTRY_GROUP_ESTABLISHED) { + +        /* If the entry group was established for a time longer then +         * 5s, reset the establishment trial counter */ +         +        if (avahi_age(&g->established_at) > 5000000) +            g->n_register_try = 0; +    } +     +    if (state == AVAHI_ENTRY_GROUP_ESTABLISHED) + +        /* If the entry group is now established, remember the time +         * this happened */ +         +        gettimeofday(&g->established_at, NULL); +          g->state = state;      if (g->callback) diff --git a/avahi-core/server.h b/avahi-core/server.h index 3e439f9..1723250 100644 --- a/avahi-core/server.h +++ b/avahi-core/server.h @@ -88,6 +88,8 @@ struct AvahiSEntryGroup {      unsigned n_register_try;      struct timeval register_time;      AvahiTimeEvent *register_time_event; + +    struct timeval established_at;      AVAHI_LLIST_FIELDS(AvahiSEntryGroup, groups);      AVAHI_LLIST_HEAD(AvahiEntry, entries); @@ -3,14 +3,12 @@ for 0.6:  * add subtype browsing  * add simplification routine for adding services  -* remove queries from queue if the browse object they were issued from is destroyed +* remove outgoing queries from queue if the browse object they were issued from is destroyed  * add API to allow user to tell the server that some service is not reachable  * Add static host configuration like static services [lathiat] -* reset commit throttling for entry groups after a while -  * consolidate browsing failure events and add an API to query the reason  * generate local CNAME responses @@ -90,3 +88,4 @@ done:  * add option to disable SO_REUSEADDR to disallow binding of multiple processes to port 5353  * add flags argument to disable cookies-setting for local services  * add API to add addresses without reverse PTR record +* reset commit throttling for entry groups after a while  | 
