From d11fa869cfa12c1ed84a64e0268282934b68b478 Mon Sep 17 00:00:00 2001 From: Jakub Stachowski Date: Tue, 6 Sep 2005 22:23:50 +0000 Subject: [PATCH] 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 --- avahi-core/iface.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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); -- 2.39.5