From da75d1898a45c106a994cd87f8da5b6bcb2b6450 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Sun, 13 Nov 2005 16:36:33 +0000 Subject: * Make "NameAcquired" warning line disappear in avahi-client Scheduler tweaks: * Add some more comments * Remove scheduled queries from the query queue if the querier which issued them dies. This reduces traffic immensly when many short lived queries are made, e.g. during host name lookups. * Don't free a querier object immediately when it is no longer referenced. Instead keep it and try to recycle it in case someone else wants to do the same query later on. Free it at the latest moment possible: just before the next query is scheduled to be made. This reduces traffic immensly when many short lived queries are made. With these two changes we can minimize the traffic to zero or near zero for many simple lookups. * When responding records with the FLUSH_CACHE bit set, reply immediately only when all response record have this bit set. Prior to this change we replied imediately as soon as one record hat this bit set. This change should make us pass *all* Bonjour mDNS conformance tests without any exceptions. git-svn-id: file:///home/lennart/svn/public/avahi/trunk@954 941a03a8-eaeb-0310-b9a0-b1bbd8fe43fe --- avahi-client/client.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'avahi-client') diff --git a/avahi-client/client.c b/avahi-client/client.c index 1067456..2fd5123 100644 --- a/avahi-client/client.c +++ b/avahi-client/client.c @@ -115,7 +115,11 @@ static DBusHandlerResult filter_func(DBusConnection *bus, DBusMessage *message, avahi_client_set_errno(client, AVAHI_ERR_DISCONNECTED); goto fail; - } if (dbus_message_is_signal(message, DBUS_INTERFACE_DBUS, "NameOwnerChanged")) { + } else if (dbus_message_is_signal(message, DBUS_INTERFACE_DBUS, "NameAcquired")) { + + /* Ignore this message */ + + } else if (dbus_message_is_signal(message, DBUS_INTERFACE_DBUS, "NameOwnerChanged")) { char *name, *old, *new; if (!dbus_message_get_args( @@ -154,7 +158,7 @@ static DBusHandlerResult filter_func(DBusConnection *bus, DBusMessage *message, } else if (!avahi_client_is_connected(client)) { - /* Ignore messages, we get in unconnected state */ + /* Ignore messages we get in unconnected state */ } else if (dbus_message_is_signal (message, AVAHI_DBUS_INTERFACE_SERVER, "StateChanged")) { int32_t state; -- cgit