• Thomas Haller's avatar
    libnm: rename MDns flag UNKNOWN to DEFAULT · 9d92848a
    Thomas Haller authored
    "UNKNOWN" is not a good name. If you don't set the property
    in the connection explicitly, it should be "DEFAULT".
    Also, make "DEFAULT" -1. For one, that ensures that the enum's
    underlying integer type is signed. Otherwise, it's cumbersome
    to test "if (mdns >= DEFAULT)" because in case of unsigned types,
    the compiler will warn about the check always being true.
    Also, it allows for "NO" to be zero. These are no strong reasons,
    but I tend to think this is better.
    Also, don't make the property of NMSettingConnection a CONSTRUCT property.
    Initialize the default manually in the init function.
    Also, order the numeric values so that DEFAULT < NO < RESOLVE < YES with
    YES being largest because it enables *the most*.
nm-types.h 7.69 KB