dns: minor fix of logging with unset dns mode

With
  [main]
  #dns=

we would see in the log:
  dns-mgr: init: dns=(null), rc-manager=symlink

Instead, it should be
  dns-mgr: init: dns=default, rc-manager=symlink

Also, we should avoid logging NULL values with "%s", although
glib's printf is fine with that.
This commit is contained in:
Thomas Haller 2016-06-03 11:56:59 +02:00
parent 4711867915
commit bcb88d540e

View file

@ -1617,8 +1617,9 @@ again:
plugin_changed = TRUE;
}
} else {
if (!NM_IN_STRSET (mode, NULL, "none", "default")) {
_LOGW ("init: unknown dns mode '%s'", mode);
if (!NM_IN_STRSET (mode, "none", "default")) {
if (mode)
_LOGW ("init: unknown dns mode '%s'", mode);
mode = "default";
}
if (_clear_plugin (self))