From 59c3714a494c3b3765657c0551ad82842d98a7d2 Mon Sep 17 00:00:00 2001 From: Sjoerd Simons Date: Sat, 26 Apr 2014 20:55:09 +0200 Subject: Imported Upstream version 0.9.8.10 --- src/firewall-manager/nm-firewall-manager.c | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) (limited to 'src/firewall-manager/nm-firewall-manager.c') diff --git a/src/firewall-manager/nm-firewall-manager.c b/src/firewall-manager/nm-firewall-manager.c index c19be5e8..cdb2f3fa 100644 --- a/src/firewall-manager/nm-firewall-manager.c +++ b/src/firewall-manager/nm-firewall-manager.c @@ -82,8 +82,13 @@ add_or_change_cb (DBusGProxy *proxy, DBusGProxyCall *call_id, gpointer user_data G_TYPE_STRING, &zone, G_TYPE_INVALID)) { g_assert (error); - nm_log_warn (LOGD_FIREWALL, "(%s) firewall zone add/change failed: (%d) %s", - info->iface, error->code, error->message); + if (g_strcmp0 (error->message, "ZONE_ALREADY_SET") != 0) { + nm_log_warn (LOGD_FIREWALL, "(%s) firewall zone add/change failed: (%d) %s", + info->iface, error->code, error->message); + } else { + nm_log_dbg (LOGD_FIREWALL, "(%s) firewall zone add/change failed: (%d) %s", + info->iface, error->code, error->message); + } } info->callback (error, info->user_data); @@ -114,7 +119,8 @@ nm_firewall_manager_add_or_change_zone (NMFirewallManager *self, info->callback = callback; info->user_data = user_data; - nm_log_dbg (LOGD_FIREWALL, "(%s) firewall zone %s -> %s", iface, add ? "add" : "change", zone); + nm_log_dbg (LOGD_FIREWALL, "(%s) firewall zone %s -> %s%s%s", iface, add ? "add" : "change", + zone?"\"":"", zone ? zone : "default", zone?"\"":""); return dbus_g_proxy_begin_call_with_timeout (priv->proxy, add ? "addInterface" : "changeZone", add_or_change_cb, @@ -137,8 +143,11 @@ remove_cb (DBusGProxy *proxy, DBusGProxyCall *call_id, gpointer user_data) G_TYPE_STRING, &zone, G_TYPE_INVALID)) { g_assert (error); - nm_log_warn (LOGD_FIREWALL, "(%s) firewall zone remove failed: (%d) %s", - info->iface, error->code, error->message); + /* ignore UNKNOWN_INTERFACE errors */ + if (error->message && !strstr (error->message, "UNKNOWN_INTERFACE")) { + nm_log_warn (LOGD_FIREWALL, "(%s) firewall zone remove failed: (%d) %s", + info->iface, error->code, error->message); + } } g_free (zone); -- cgit 1.3.0-6-gf8a5