diff options
author | Thomas Haller <thaller@redhat.com> | 2018-09-11 22:03:11 +0200 |
---|---|---|
committer | Thomas Haller <thaller@redhat.com> | 2018-09-12 09:46:28 +0200 |
commit | d3ba511cce24a7cba0c5c47927a8ee0767bcca79 (patch) | |
tree | abe99fada753858de51de386a1e90d60edc59665 /src/ppp | |
parent | d3e0a0f9b347443c561184280b3a4fbac9b5e6cc (diff) | |
download | NetworkManager-d3ba511cce24a7cba0c5c47927a8ee0767bcca79.tar.gz |
ppp: cleanup logging in impl_ppp_manager_set_ifindex()
It's enough that all code paths in impl_ppp_manager_set_ifindex() log exactly
one message. Also, give all messages the same prefix, so that it's clear where
they come from.
(cherry picked from commit 2a45c32e8c5b25889dc10a8b954f79a3539d39b7)
Diffstat (limited to 'src/ppp')
-rw-r--r-- | src/ppp/nm-ppp-manager.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/src/ppp/nm-ppp-manager.c b/src/ppp/nm-ppp-manager.c index e168613947..b231ff2059 100644 --- a/src/ppp/nm-ppp-manager.c +++ b/src/ppp/nm-ppp-manager.c @@ -438,13 +438,11 @@ impl_ppp_manager_set_ifindex (NMDBusObject *obj, g_variant_get (parameters, "(i)", &ifindex); - _LOGD ("set-ifindex %d", (int) ifindex); - if (priv->ifindex >= 0) { if (priv->ifindex == ifindex) - _LOGD ("ignore repeated calls setting ifindex to %d", (int) ifindex); + _LOGD ("set-ifindex: ignore repeated calls setting ifindex to %d", (int) ifindex); else - _LOGW ("can't change the ifindex from %d to %d", priv->ifindex, (int) ifindex); + _LOGW ("set-ifindex: can't change the ifindex from %d to %d", priv->ifindex, (int) ifindex); goto out; } @@ -457,14 +455,15 @@ impl_ppp_manager_set_ifindex (NMDBusObject *obj, } if (!plink) { - _LOGW ("unknown interface with ifindex %d", ifindex); + _LOGW ("set-ifindex: unknown interface with ifindex %d", ifindex); ifindex = 0; + } else { + obj_keep_alive = nmp_object_ref (NMP_OBJECT_UP_CAST (plink)); + _LOGD ("set-ifindex: %d, name \"%s\"", (int) ifindex, plink->name); } priv->ifindex = ifindex; - obj_keep_alive = nmp_object_ref (NMP_OBJECT_UP_CAST (plink)); - g_signal_emit (self, signals[IFINDEX_SET], 0, |