From f48888a430209edc0ec35e4ccc58746177666a1e Mon Sep 17 00:00:00 2001 From: Jim Broadus Date: Sun, 2 May 2021 21:44:53 -0700 Subject: [PATCH] networkremote: Fix some log noise. In avahi, don't log empty errors. --- src/networkremote/avahi.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/networkremote/avahi.cpp b/src/networkremote/avahi.cpp index fcf794718..55feb8f76 100644 --- a/src/networkremote/avahi.cpp +++ b/src/networkremote/avahi.cpp @@ -39,7 +39,9 @@ void AddService(const QString domain, const QString type, const QByteArray name, << "is set to 'yes' in avahi-daemon.conf"; return; } - qLog(Debug) << path_reply.error(); + if (path_reply.isError()) { + qLog(Debug) << path_reply.error(); + } OrgFreedesktopAvahiEntryGroupInterface* entry_group_interface = new OrgFreedesktopAvahiEntryGroupInterface("org.freedesktop.Avahi", path_reply.value().path(), @@ -75,7 +77,11 @@ void Commit(OrgFreedesktopAvahiEntryGroupInterface* interface) { } void LogCommit(QDBusPendingReply<> reply) { - qLog(Debug) << "Remote interface published on Avahi:" << reply.error(); + if (reply.isError()) { + qLog(Debug) << "Commit error:" << reply.error(); + } else { + qLog(Debug) << "Remote interface published on Avahi."; + } } } // namespace