[avahi] [PATCH] core: decrement n_probing when removing announcer

Tom Deseyn tom.deseyn at gmail.com
Thu Mar 6 23:44:36 PST 2014


This patch could be a fix for: http://avahi.org/ticket/201.
"also seen it happen when a network interface happened to go down just
as avahi was restarted" --> when a network interface goes down, the
announcers are removed

I am unable to register at avahi.org to comment on the ticket.

Wkr,

Tom

On Thu, Mar 6, 2014 at 6:56 PM, Master T <tom.deseyn at gmail.com> wrote:
> Decrement n_probing when removing probing announcer so group doesn't get stuck registering because n_probing can no longer decrement to zero.
>
> Signed-off-by: Master T <tom.deseyn at gmail.com>
> ---
>  avahi-core/announce.c |    6 ++++++
>  1 file changed, 6 insertions(+)
>  mode change 100644 => 100755 avahi-core/announce.c
>
> diff --git a/avahi-core/announce.c b/avahi-core/announce.c
> old mode 100644
> new mode 100755
> index ccdbf15..b0ce232
> --- a/avahi-core/announce.c
> +++ b/avahi-core/announce.c
> @@ -35,8 +35,14 @@
>  #define AVAHI_PROBE_INTERVAL_MSEC 250
>
>  static void remove_announcer(AvahiServer *s, AvahiAnnouncer *a) {
> +    AvahiEntry *e;
> +
>      assert(s);
>      assert(a);
> +    e = a->entry;
> +
> +    if (a->state == AVAHI_PROBING && e->group)
> +        e->group->n_probing--;
>
>      if (a->time_event)
>          avahi_time_event_free(a->time_event);
> --
> 1.7.10.4
>


More information about the avahi mailing list