1. 12 Feb, 2019 1 commit
  2. 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.
  3. 18 Apr, 2018 1 commit
  4. 28 Nov, 2017 1 commit
    • Thomas Haller's avatar
      c-list: re-import latest version of c-list.h from upstream · b6efac9e
      Thomas Haller authored
      Most notably, it renames
        c_list_unlink_init() -> c_list_unlink()
        c_list_unlink() -> c_list_unlink_stale()
        $ sed -e 's/\<c_list_unlink\>/c_list_unlink_old/g' \
              -e 's/\<c_list_unlink_init\>/c_list_unlink/g' \
              -e 's/\<c_list_unlink_old\>/c_list_unlink_stale/g' \
              $(git grep -l c_list_unlink -- ':(exclude)shared/nm-utils/c-list.h') \
  5. 11 May, 2017 1 commit
  6. 10 May, 2017 2 commits
  7. 21 Apr, 2017 12 commits
  8. 24 Mar, 2017 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. 03 Oct, 2016 1 commit
  11. 04 Apr, 2016 1 commit
  12. 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
  13. 12 Feb, 2016 1 commit
    • Thomas Haller's avatar
      build: cleanup default includes · 2c2d9d2e
      Thomas Haller authored
      - "gsystem-local-alloc.h" and <gio/gio.h> are already included via
        "nm-default.h". No need to include them separately.
      - include "nm-macros-internal.h" via "nm-default.h" and drop all
        explict includes.
      - in the modified files, ensure that we always include "config.h"
        and "nm-default.h" first. As second, include the header file
        for the current source file (if applicable). Then follow external
        includes and finally internal nm includes.
      - include nm headers inside source code files with quotes
      - internal header files don't need to include default headers.
        They can savely assume that "nm-default.h" is already included
        and with it glib, nm-glib.h, nm-macros-internal.h, etc.
  14. 30 Sep, 2015 3 commits
  15. 29 Sep, 2015 1 commit
  16. 25 Sep, 2015 5 commits
    • Thomas Haller's avatar
      firewall: always take a reference to NMFirewallManager during asynchronous operations · bb7e6c2c
      Thomas Haller authored
      Always take a reference to the manager when scheaduling an asynchronous
      operations. In fact, all callers want to keep the manager alive as long
      as there are operations in progress.
    • Thomas Haller's avatar
      firewall: refactor callback handling in NMFirewallManager · 94f888a2
      Thomas Haller authored
      Refactor NMFirewallManager to have consistent semantics about
      asynchronous calls.
        - the callback is always invoked exactly once, but never
          synchronously when starting the operation.
        - while cancelling the request, the callback is invoked
          synchronously with respect to the cancel operation.
        - you can cancel a request once (and once only).
        - you cannot cancel the request once the callback is invoked.
        - when disposing the object with requests pending, the
          callbacks are invoked synchronously.
      - Add a callback argument to nm_firewall_manager_remove_from_zone().
        Otherwise, the user never knows whether a call is still pending and
        cancellable (as complete operations cannot be cancelled).
        In fact, it makes no sense trying to cancel a call if you don't care
        about when it completes.
      - get rid of PENDING_CALL_DUMMY. The dummy callback allows cancellation
        any number of times. We want to catch wrong usage by asserting that an
        operation is only cancelled once.
      - nm_firewall_manager_cancel_call() doesn't need the manager argument.
        Either the call-id is valid (and has a valid pointer to the manager),
        or there is a bug and it is a dangling pointer.
    • Thomas Haller's avatar
      firewall: add arguments to NMFirewallManagerAddRemoveCallback · 5bc4d7f0
      Thomas Haller authored
      We should return the target object and the call_id.
    • Thomas Haller's avatar
      firewall/trivial: rename FwAddToZoneFunc to NMFirewallManagerAddRemoveCallback · d3a82546
      Thomas Haller authored
      Give it a proper NMFirewallManager* prefix to make it clear where the type belongs.
      Also, we will add a similar callback for nm_firewall_manager_remove_from_zone(),
      so reflect that in the name.
    • Thomas Haller's avatar
      firewall/trivial: rename NMFirewallPendingCall to NMFirewallManagerCallId · 0d33b73e
      Thomas Haller authored
      Matches the naming scheme for other call-ids.
  17. 05 Aug, 2015 1 commit
  18. 24 Jul, 2015 2 commits
    • 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).
    • Thomas Haller's avatar
      core: move NM_DEFINE_SINGLETON macros to src/NetworkManagerUtils.h · 8bca8641
      Thomas Haller authored
      NM_DEFINE_SINGLETON is used only by core and makes use of nm-logging.
      It does not belong to "include/nm-macros-internal.h". Move it to "src/".
  19. 03 Apr, 2015 2 commits
  20. 12 Jan, 2015 1 commit