]> git.meshlink.io Git - catta/commitdiff
Match rr_pending increases/decreases. Fixed crash (assert rr_pending>0)
authorJakub Stachowski <qbast@go2.pl>
Tue, 6 Sep 2005 22:23:50 +0000 (22:23 +0000)
committerJakub Stachowski <qbast@go2.pl>
Tue, 6 Sep 2005 22:23:50 +0000 (22:23 +0000)
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

index d5fe5b134644be589ef1d7e757f58a86d8eb979e..38d9909cb28c6d91a7490676b14712a7e6a2b569 100644 (file)
@@ -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);