1. 03 Apr, 2019 1 commit
  2. 19 Mar, 2019 1 commit
    • Lubomir Rintel's avatar
      all: goodbye libnm-glib · 1de8383a
      Lubomir Rintel authored
      This removes libnm-glib, libnm-glib-vpn, and libnm-util for good.
      The it has been replaced with libnm since NetworkManager 1.0, disabled
      by default since 1.12 and no up-to-date distributions ship it for years
      Removing the libraries allows us to:
      * Remove the horrible hacks that were in place to deal with accidental use
        of both the new and old library in a single process.
      * Relief the translators of maintenance burden of similar yet different
      * Get rid of known bad code without chances of ever getting fixed
        (libnm-glib/nm-object.c and libnm-glib/nm-object-cache.c)
      * Generally lower the footprint of the releases and our workspace
      If there are some really really legacy users; they can just build
      libnm-glib and friends from the NetworkManager-1.16 distribution. The
      D-Bus API is stable and old libnm-glib will keep working forever.
  3. 10 May, 2018 1 commit
    • Lubomir Rintel's avatar
      all: use the elvis operator wherever possible · e69d3869
      Lubomir Rintel authored
        expression a, b;
        -a ? a : b
        +a ?: b
      Applied with:
        spatch --sp-file ternary.cocci --in-place --smpl-spacing --dir .
      With some manual adjustments on spots that Cocci didn't catch for
      reasons unknown.
      Thanks to the marvelous effort of the GNU compiler developer we can now
      spare a couple of bits that could be used for more important things,
      like this commit message. Standards commitees yet have to catch up.
  4. 30 Apr, 2018 1 commit
  5. 03 Oct, 2016 1 commit
  6. 29 Mar, 2016 2 commits
  7. 26 Mar, 2016 1 commit
  8. 15 Mar, 2016 2 commits
  9. 19 Feb, 2016 1 commit
    • Thomas Haller's avatar
      all: cleanup includes and let "nm-default.h" include "config.h" · 8bace23b
      Thomas Haller authored
      - All internal source files (except "examples", which are not internal)
        should include "config.h" first. As also all internal source
        files should include "nm-default.h", let "config.h" be included
        by "nm-default.h" and include "nm-default.h" as first in every
        source file.
        We already wanted to include "nm-default.h" before other headers
        because it might contains some fixes (like "nm-glib.h" compatibility)
        that is required first.
      - After including "nm-default.h", we optinally allow for including the
        corresponding header file for the source file at hand. The idea
        is to ensure that each header file is self contained.
      - Don't include "config.h" or "nm-default.h" in any header file
        (except "nm-sd-adapt.h"). Public headers anyway must not include
        these headers, and internal headers are never included after
        "nm-default.h", as of the first previous point.
      - Include all internal headers with quotes instead of angle brackets.
        In practice it doesn't matter, because in our public headers we must
        include other headers with angle brackets. As we use our public
        headers also to compile our interal source files, effectively the
        result must be the same. Still do it for consistency.
      - Except for <config.h> itself. Include it with angle brackets as suggested by
  10. 18 Dec, 2015 1 commit
    • Thomas Haller's avatar
      libnm-util: allow unknown setting types in nm_connection_get_virtual_iface_name() · 8c27a370
      Thomas Haller authored
      Allow calling nm_connection_get_virtual_iface_name() on a non-verified
      connection by not asserting asserting against a valid base-setting.
      On nma-1-0 branch, nm-applet can crash with:
          #3  0x00007ffff2993a7a in g_assertion_message_expr (domain=0x7ffff51fad86 "libnm-util", file=0x7ffff51fb728 "nm-connection.c", line=320, func=0x7ffff51fc028 "_get_type_setting", expr=<optimized out>) at gtestutils.c:2444
          #4  0x00007ffff51ac52f in _get_type_setting (connection=0xa3c160 [NMRemoteConnection]) at nm-connection.c:320
          #5  0x00007ffff51ac341 in nm_connection_get_virtual_iface_name (connection=0xa3c160 [NMRemoteConnection]) at nm-connection.c:1436
          #6  0x0000000000415bdc in add_virtual_items (type=type@entry=0x43c11d "bridge", all_devices=all_devices@entry=0x7f6580, all_connections=all_connections@entry=0x9354a0, menu=menu@entry=0x922990 [GtkMenu], applet=applet@entry=0x6cc000 [NMApplet]) at applet.c:1640
          #7  0x00000000004176f6 in nma_menu_add_devices (menu=menu@entry=0x922990 [GtkMenu], applet=applet@entry=0x6cc000 [NMApplet]) at applet.c:1713
          #8  0x0000000000418315 in nma_menu_show_cb (menu=0x922990 [GtkMenu], applet=0x6cc000 [NMApplet]) at applet.c:1974
      where the connection type is "tun".
      Note that libnm accepts invalid connections and exposes them to the
      user (albeit issuing a warning). Later on there are many places where
      that can lead to further g_return*(), which is ugly indeed.
      At least, we should not assert against valid connections (because that
      crashes the user) and there is a well known fact that the base setting
      will be missing for tun settings. No need to even warn about that in
      nm_connection_get_virtual_iface_name() (we already got the warning
      during replace_settings).
  11. 05 Aug, 2015 2 commits
  12. 24 Jul, 2015 1 commit
    • Dan Winship's avatar
      all: rename nm-glib-compat.h to nm-glib.h, use everywhere · 3452ee2a
      Dan Winship authored
      Rather than randomly including one or more of <glib.h>,
      <glib-object.h>, and <gio/gio.h> everywhere (and forgetting to include
      "nm-glib-compat.h" most of the time), rename nm-glib-compat.h to
      nm-glib.h, include <gio/gio.h> from there, and then change all .c
      files in NM to include "nm-glib.h" rather than including the glib
      headers directly.
      (Public headers files still have to include the real glib headers,
      since nm-glib.h isn't installed...)
      Also, remove glib includes from header files that are already
      including a base object header file (which must itself already include
      the glib headers).
  13. 09 Feb, 2015 1 commit
  14. 13 Nov, 2014 2 commits
    • Dan Winship's avatar
      libnm*: fix library gettext usage · 53f5e9af
      Dan Winship authored
      Libraries need to include <gi18n-lib.h>, not <gi18n.h>, so that _()
      will get defined to "dgettext (GETTEXT_DOMAIN, string)" rather than
      "gettext (string)" (which will use the program's default domain, which
      works fine for programs in the NetworkManager tree, but not for
      external users). Likewise, we need to call bindtextdomain() so that
      gettext can find the translations if the library is installed in a
      different prefix from the program using it (and
      bind_textdomain_codeset(), so it will know the translations are in
      UTF-8 even if the locale isn't).
      (The fact that no one noticed this was broken before is because the
      libraries didn't really start returning useful translated strings much
      until 0.9.10, and none of the out-of-tree clients have been updated to
      actually show those strings to users yet.)
    • Dan Winship's avatar
      all: consistently include config.h · 3bfb163a
      Dan Winship authored
      config.h should be included from every .c file, and it should be
      included before any other include. Fix that.
      (As a side effect of how I did this, this also changes us to
      consistently use "config.h" rather than <config.h>. To the extent that
      it matters [which is not much], quotes are more correct anyway, since
      we're talking about a file in our own build tree, not a system
  15. 22 Aug, 2014 1 commit
  16. 15 Jul, 2014 3 commits
  17. 30 Jun, 2014 4 commits
    • Thomas Haller's avatar
      libnm-util: normalize IP settings in connection · 29d53823
      Thomas Haller authored
      This is the same behaviour as nm_utils_normalize_connection(),
      which will soon be removed in favor of nm_connection_normalize().
      This takes care, that normal connections always have an IP4 and IP6 setting,
      and that slave connections never have it.
      Signed-off-by: Thomas Haller's avatarThomas Haller <thaller@redhat.com>
    • Thomas Haller's avatar
      libnm-util: normalize virtual_iface_name in NMSettings · 2deaa539
      Thomas Haller authored
      Some type-specific NMSetting implementations (bond, bridge, team, vlan)
      have their own 'interface-name' property. This property will be
      deprecated in favour of 'interface-name' in NMSettingConnection.
      Change verify() and normalize() to check that the redundant
      values match and repair/normalize the properties.
      Force the virtual interface name of the type-specific setting to be
      equal to NMSettingConnection:interface_name. This way, the depreacted
      field stays valid and backward compatible.
      NMSettingInfiniband is special, because it does not have a backing
      property for the interface name, although it implements
      get_virtual_iface_name(). To account for this, some special handling
      is needed in order not to change the behaviour of get_virtual_iface_name().
      Signed-off-by: Thomas Haller's avatarThomas Haller <thaller@redhat.com>
    • Thomas Haller's avatar
      libnm-util: add function nm_connection_normalize · de5656a5
      Thomas Haller authored
      This function behaves like verify(), but it also performs some
      normalization/fixing of inconsistent connections.
      Contrary to verify(), this function might modify the settings.
      This will be mainly used, to repair connections from older versions
      and to fix deprecated options.
      Signed-off-by: Thomas Haller's avatarThomas Haller <thaller@redhat.com>
    • Thomas Haller's avatar
  18. 19 Jun, 2014 2 commits
  19. 05 Mar, 2014 1 commit
  20. 13 Feb, 2014 1 commit
  21. 27 Jan, 2014 1 commit
  22. 15 Jan, 2014 3 commits
  23. 17 Dec, 2013 1 commit
  24. 05 Dec, 2013 1 commit
  25. 07 Nov, 2013 1 commit
  26. 01 Nov, 2013 2 commits
  27. 31 Oct, 2013 1 commit