From: Jakub Stachowski Date: Tue, 6 Sep 2005 22:23:50 +0000 (+0000) Subject: Match rr_pending increases/decreases. Fixed crash (assert rr_pending>0) X-Git-Url: https://git.meshlink.io/?a=commitdiff_plain;h=d11fa869cfa12c1ed84a64e0268282934b68b478;p=catta Match rr_pending increases/decreases. Fixed crash (assert rr_pending>0) when running dhclient after bringing interface down. git-svn-id: file:///home/lennart/svn/public/avahi/trunk@519 941a03a8-eaeb-0310-b9a0-b1bbd8fe43fe --- diff --git a/avahi-core/iface.c b/avahi-core/iface.c index d5fe5b1..38d9909 100644 --- a/avahi-core/iface.c +++ b/avahi-core/iface.c @@ -85,7 +85,8 @@ static void update_address_rr(AvahiInterfaceMonitor *m, AvahiInterfaceAddress *a char t[64]; avahi_address_snprint(t, sizeof(t), &a->address); - if (avahi_s_entry_group_get_state(a->entry_group) == AVAHI_ENTRY_GROUP_REGISTERING) + if (avahi_s_entry_group_get_state(a->entry_group) == AVAHI_ENTRY_GROUP_REGISTERING && + m->server->state == AVAHI_SERVER_REGISTERING) avahi_server_decrease_host_rr_pending(m->server); avahi_log_info("Withdrawing address %s on %s.", t, a->interface->hardware->name);