1. 10 Dec, 2019 2 commits
  2. 01 Oct, 2019 1 commit
  3. 10 Sep, 2019 1 commit
  4. 11 Jun, 2019 1 commit
    • Thomas Haller's avatar
      all: drop emacs file variables from source files · c0e075c9
      Thomas Haller authored
      We no longer add these. If you use Emacs, configure it yourself.
      Also, due to our "smart-tab" usage the editor anyway does a subpar
      job handling our tabs. However, on the upside every user can choose
      whatever tab-width he/she prefers. If "smart-tabs" are used properly
      (like we do), every tab-width will work.
      No manual changes, just ran commands:
          F=($(git grep -l -e '-\*-'))
          sed '1 { /\/\* *-\*-  *[mM]ode.*\*\/$/d }'     -i "${F[@]}"
          sed '1,4 { /^\(#\|--\|dnl\) *-\*- [mM]ode/d }' -i "${F[@]}"
      Check remaining lines with:
          git grep -e '-\*-'
      The ultimate purpose of this is to cleanup our files and eventually use
      SPDX license identifiers. For that, first get rid of the boilerplate lines.
  5. 05 Nov, 2018 1 commit
  6. 30 Jun, 2018 1 commit
    • Thomas Haller's avatar
      nm-online: print "[started|start-pending|failure]" for --wait-for-startup · 7f2b7ee4
      Thomas Haller authored
      `nm-online --wait-for-startup` isn't really intended to be called directly.
      It is mainly for implementing "NetworkManager-wait-online.service".
      Anyway, at the end, the result does not indicate the connectivty status
      of the host. Hence, printing
        Connecting...............   30s [online]
      is misleading. It merely means, that startup is complete. Likewise,
      printing "[offline]" would not mean that there is no connectivity.
      Instead, it means that startup is still in progress on timeout.
      As it is now, the distinction between whether to print "start-pending"
      and "failure" is not very clear. Not that it matters much. At least is
      corresponds to the exit status of the program. If we sometimes confuse
      EXIT_FAILURE_OFFLINE with other failure reasons, the exit status needs
      to be corrected first.
  7. 18 Jan, 2018 1 commit
  8. 08 Jan, 2018 1 commit
  9. 07 Feb, 2017 1 commit
    • Thomas Haller's avatar
      nm-online: fix wrong assertion failure during nm-online · ec91f950
      Thomas Haller authored
      _return() assigns the return value @retval and asserts that
      currently no return-value is assigned -- in order not to overwrite
      a once set value.
      That requires, that we call _return() and exit the main-loop right
      away, without possibility to call _return() again.
      However, during client_properties_changed() we easily might
      receive the "notify" signal multiple times, and thus call
      quit_if_connected() and _return() multiple times. That would
      lead to a wrong assertion failure.
      Avoid that, by disconnecting the signal handler once we reach
      Fixes: f7875a42
  10. 02 Feb, 2017 2 commits
  11. 30 Jan, 2017 1 commit
  12. 28 Jan, 2017 1 commit
    • James McCoy's avatar
      nm-online: return from quit_if_connected after setting retval · dbd365c3
      James McCoy authored
      c5f17a97 changed nm-online to determine
      the status asynchronously, however this introduced a regression with
      "nm-online -x -q" when there is connectivity.
              if (   state == NM_STATE_CONNECTED_LOCAL
                  || state == NM_STATE_CONNECTED_SITE
                  || state == NM_STATE_CONNECTED_GLOBAL) {
                  data->retval = 0;
                  g_main_loop_quit (data->loop);
          if (data->exit_no_nm && (state != NM_STATE_CONNECTING)) {
              data->retval = 1;
              g_main_loop_quit (data->loop);
      After setting data->retval = 0 in the "state is connected" branch, the
      function falls through to the "exit_no_nm and !connecting" branch,
      overwriting data->retval.  This causes "nm-online -x -q" to incorrectly
      report an offline state.
      Adding an explicit "return;" after any state where data->retval is set
      ensures that the value isn't overwritten before main() uses it.
      Fixes: c5f17a97
  13. 04 Jan, 2017 1 commit
  14. 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
  15. 16 Nov, 2015 1 commit
  16. 05 Aug, 2015 2 commits
  17. 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).
  18. 12 Jul, 2015 1 commit
  19. 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
  20. 07 Aug, 2014 1 commit
  21. 01 Aug, 2014 2 commits
    • Dan Winship's avatar
      libnm: add NetworkManager.h, disallow including individual headers · d0b05b34
      Dan Winship authored
      Add NetworkManager.h, which includes all of the other NM header, and
      require all external users of libnm to use that rather than the
      individual headers.
      (An exception is made for nm-dbus-interface.h,
      nm-vpn-dbus-interface.h, and nm-version.h, which can be included
    • Dan Winship's avatar
      libnm: make the the use of GInitable mandatory · 258e74eb
      Dan Winship authored
      Remove _nm_object_ensure_inited(), etc; objects that implement
      GInitable are now mandatory-to-init().
      Remove constructor() implementations that sometimes return NULL; do
      all the relevant checking in init() instead.
      Make nm_client_new() and nm_remote_settings_new() take a GCancellable
      and a GError**.
  22. 30 Jul, 2014 1 commit
    • Dan Winship's avatar
      clients: reorganize source tree, put all the installed clients together · 3d25d704
      Dan Winship authored
      Create a new clients/ subdirectory at the top level, and move cli/ and
      tui/ into it, as well as nm-online.c (which was previously in test/,
      which made no sense).
      cli/ was split into two subdirectories, src/ and completion/. While
      this does simplify things (given that the completion file and the
      binary both need to be named "nmcli"), it bloats the source tree, and
      we can work around it by just renaming the completion file at install
      time. Then we can combine the two directories into one and just have
      it all under clients/cli/.
  23. 20 Jun, 2014 1 commit
  24. 27 May, 2014 1 commit
  25. 31 Mar, 2014 3 commits
  26. 14 Oct, 2013 1 commit
  27. 16 Aug, 2013 1 commit
    • Dan Winship's avatar
      nm-online: wait for all startup-time connections, not just one · 44ac1020
      Dan Winship authored
      Rewrite nm-online to use libnm-glib, and change it so that it waits
      until NM has finished all of its startup-time connection activation
      attempts, rather than only waiting until at least one has succeeded.
      In particular, this means that on multi-homed servers, the
      NetworkManager-wait-online systemd service (and by extension,
      network.service) will now block until *all* of the server's IP
      addresses are up, which is needed for some old daemons that assume
      that no network interfaces will be added after they start.
  28. 23 Jul, 2013 1 commit
  29. 11 Jul, 2013 1 commit
  30. 26 Sep, 2012 1 commit
    • Dan Winship's avatar
      all: Don't use ctype.h macros · 6878d20a
      Dan Winship authored
      The ctype macros (eg, isalnum(), tolower()) are locale-dependent. Use
      glib's ASCII-only versions instead.
      Also, replace isascii() with g_ascii_isprint(), since isascii()
      accepts control characters, which isn't what the code wanted in any of
      the places where it was using it.
  31. 09 Jul, 2012 1 commit
  32. 14 Feb, 2011 1 commit
    • Dan Williams's avatar
      api: add additional NM daemon states · ec115ed4
      Dan Williams authored
      DISCONNECTING: the only active network connection is now being disconnected
      LOCAL, SITE, GLOBAL: one-stop items for level of connectivity, which
      we'll use to show when we think we're actually connected to the internet
      or behind a captive portal or something
  33. 20 May, 2010 1 commit
  34. 02 May, 2009 1 commit