1. 18 Apr, 2019 1 commit
  2. 12 Feb, 2019 1 commit
  3. 29 Nov, 2018 1 commit
    • Lubomir Rintel's avatar
      all: say Wi-Fi instead of "wifi" or "WiFi" · b385ad01
      Lubomir Rintel authored
      Correct the spelling across the *entire* tree, including translations,
      comments, etc. It's easier that way.
      Even the places where it's not exposed to the user, such as tests, so
      that we learn how is it spelled correctly.
  4. 11 Jul, 2018 1 commit
    • Thomas Haller's avatar
      all: don't use gchar/gshort/gint/glong but C types · e1c7a2b5
      Thomas Haller authored
      We commonly don't use the glib typedefs for char/short/int/long,
      but their C types directly.
          $ git grep '\<g\(char\|short\|int\|long\|float\|double\)\>' | wc -l
          $ git grep '\<\(char\|short\|int\|long\|float\|double\)\>' | wc -l
      One could argue that using the glib typedefs is preferable in
      public API (of our glib based libnm library) or where it clearly
      is related to glib, like during
        g_object_set (obj, PROPERTY, (gint) value, NULL);
      However, that argument does not seem strong, because in practice we don't
      follow that argument today, and seldomly use the glib typedefs.
      Also, the style guide for this would be hard to formalize, because
      "using them where clearly related to a glib" is a very loose suggestion.
      Also note that glib typedefs will always just be typedefs of the
      underlying C types. There is no danger of glib changing the meaning
      of these typedefs (because that would be a major API break of glib).
      A simple style guide is instead: don't use these typedefs.
      No manual actions, I only ran the bash script:
        FILES=($(git ls-files '*.[hc]'))
        sed -i \
            -e 's/\<g\(char\|short\|int\|long\|float\|double\)\>\( [^ ]\)/\1\2/g' \
            -e 's/\<g\(char\|short\|int\|long\|float\|double\)\>  /\1   /g' \
            -e 's/\<g\(char\|short\|int\|long\|float\|double\)\>/\1/g' \
  5. 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.
  6. 22 Mar, 2017 1 commit
  7. 06 Feb, 2017 1 commit
    • Thomas Haller's avatar
      build: fix -Wignored-qualifiers warnings · e68cc17f
      Thomas Haller authored
          ./src/nm-config-data.h:163:1: error: 'const' type qualifier on return type has no effect [-Werror,-Wignored-qualifiers]
          const guint nm_config_data_get_connectivity_interval (const NMConfigData *config_data);
  8. 11 Oct, 2016 1 commit
  9. 04 Oct, 2016 1 commit
    • Thomas Haller's avatar
      core: refactor private data in "src" · 4d37f7a1
      Thomas Haller authored
      - use _NM_GET_PRIVATE() and _NM_GET_PRIVATE_PTR() everywhere.
      - reorder statements, to have GObject related functions (init, dispose,
        constructed) at the bottom of each file and in a consistent order w.r.t.
        each other.
      - unify whitespaces in signal and properties declarations.
      - use NM_GOBJECT_PROPERTIES_DEFINE() and _notify()
      - drop unused signal slots in class structures
      - drop unused header files for device factories
  10. 23 Aug, 2016 2 commits
  11. 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
  12. 13 Aug, 2015 1 commit
  13. 05 Aug, 2015 1 commit
  14. 13 Nov, 2014 1 commit
    • 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. 05 Jun, 2013 1 commit
  16. 24 May, 2013 1 commit
  17. 08 May, 2013 1 commit
  18. 07 May, 2013 1 commit
    • Dan Winship's avatar
      core, libnm-glib: add NMDeviceGeneric · ce4f2a4b
      Dan Winship authored
      Add NMDeviceGeneric, to provide generic support for unknown device
      types, and create NMDeviceGenerics for those devices that NM
      previously was ignoring. Allow NMSettingGeneric connections to be
      activated on (managed) NMDeviceGenerics.
  19. 07 Mar, 2013 1 commit
  20. 04 Mar, 2013 1 commit
  21. 30 Nov, 2012 1 commit
  22. 26 Nov, 2012 1 commit
    • Daniel Drake's avatar
      core: don't enumerate uninitialized devices from udev (fdo #56929) · c6fb063e
      Daniel Drake authored
      When enumerating devices, libgudev's matching by default will return
      devices which udev has not yet finished initializing.
      This was frequently causing boot-time races on the OLPC XO, where
      NetworkManager would bring a device up before udev had renamed it,
      causing the later rename to fail.
      To solve this, filter the enumeration matches to only include
      initialized devices. The devices that are present but uninitialized
      at this time will arrive a short time later, via a uevent.
      (dcbw: update gudev version check in configure.ac)
  23. 17 Aug, 2012 3 commits
  24. 18 May, 2012 1 commit
    • Pantelis Koukousoulas's avatar
      adsl: settings and initial "scaffolding" · 0e6f5ce3
      Pantelis Koukousoulas authored
      This patch adds the settings code (NMSettingAdsl) and the initial
      "scaffolding" i.e., a tiny stub version of NMDeviceAdsl and the
      udev handler code to get the device detected.
      With this patch you should be able to see an atm device being detected
      by networkmanager in the logs, although of course it doesn't
      do anything useful yet.
      Extract from the logs:
       [1304668252.341354] [nm-udev-manager.c:562] adsl_add(): adsl_add: ATM Device detected from udev. Adding ..
      (ueagle-atm0): failed to look up interface index
      (ueagle-atm0): new ADSL device (driver: 'ueagle-atm' ifindex: -1)
      (ueagle-atm0): exported as /org/freedesktop/NetworkManager/Devices/2
      (ueagle-atm0): now managed
      (ueagle-atm0): device state change: unmanaged -> unavailable (reason 'managed') [10 20 2]
      (ueagle-atm0): deactivating device (reason: 2).
       [1304668252.345102] [nm-system.c:1349] flush_routes(): (ueagle-atm0) failed to lookup interface index
       [1304668252.347821] [nm-device.c:3912] nm_device_state_changed(): (ueagle-atm0): device is available,
      In this version, we hack the nm-device.c:nm_device_get_priority() to get better priority
      instead of changing the DeviceType enum.
      Signed-off-by: default avatarPantelis Koukousoulas <pktoss@gmail.com>
  25. 16 Feb, 2012 1 commit
  26. 09 Feb, 2012 1 commit
  27. 06 Feb, 2012 1 commit
    • Dan Williams's avatar
      core: move device creation into the manager · 95b0b722
      Dan Williams authored
      Consolidate device creation in the manager object; bluetooth and
      modem devices were already handled by it, so it makes sense to do
      it all from one place.  Furthermore we'll be creating virtual devices
      in the manager too.  It also reduces indirection (no need to send
      device_creator() in the DEVICE_ADDED signal) and makes the code
      flow clearer.
  28. 15 Dec, 2011 1 commit
    • Dan Williams's avatar
      core: handle N900 USB network interface again · 6b31828f
      Dan Williams authored
      839c7909 made NM ignore this interface based on faulty
      information about what the interface did.  It's actually
      just a normal network interface that the N900 can use
      to talk to the host or whatever.  It's a bit annoying
      that for the most part it won't be used and that NM will
      keep attempting to connect it with DHCP unless the user
      changes the connection to be static IP (N900 defaults to
      address and expects the computer to be and requires an ifup in it's Xterm app) but
      if you have an N900 you're probably more knowledgable
      than most.
  29. 02 Dec, 2011 2 commits
  30. 10 Nov, 2011 4 commits
  31. 30 Sep, 2011 2 commits
    • Dan Williams's avatar
    • Gary Ching-Pang Lin's avatar
      core: improving handling of rfkill (bgo #655773) · 339229e4
      Gary Ching-Pang Lin authored
      This commit improves the handling of rfkill.
      - The original two passes check gathers the states of platform
        and non-platform switches in two separate loops. Now we gather
        the both states in one loop and determine the final states later.
      - A new rule is used to determine the states of switches.
        if (platform_state == UNBLOCKED)
                choose non_platform_state;
                choose platform_state;
        The state is UNBLOCKED if and only if both the platform and
        non-platform switches are unblocked, so the ambiguous state in
        bgo#655773 will not happen.
        Original code always preferred the platform switch state over
        the device switch state, so if the platform switch was UNBLOCKED
        but the device was BLOCKED, NM would treat the device as
        UNBLOCKED and try to activate it, and obviously fail.
  32. 15 Jun, 2011 1 commit