1. 03 Mar, 2016 1 commit
    • Thomas Haller's avatar
      all: clean-up usage of GError · 01b9b410
      Thomas Haller authored
      Functions that take a GError** MUST fill it in on error. There is no
      need to check whether error is NULL if the function it was passed to
      had a failing return value.
      
      Likewise, a proper GError must have a non-NULL message, so there's no
      need to double-check that either.
      Based-on-patch-by: Dan Winship's avatarDan Winship <danw@gnome.org>
      01b9b410
  2. 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
        https://www.gnu.org/software/autoconf/manual/autoconf.html#Configuration-Headers
      8bace23b
  3. 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.
      2c2d9d2e
  4. 26 Jan, 2016 2 commits
  5. 21 Jan, 2016 1 commit
  6. 04 Dec, 2015 1 commit
  7. 05 Aug, 2015 1 commit
  8. 24 Jul, 2015 2 commits
    • Dan Winship's avatar
      libnm-glib: drop private bus support · ee707ba9
      Dan Winship authored
      Anything that actually *needs* private bus support will be built
      against libnm these days anyway.
      ee707ba9
    • 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).
      3452ee2a
  9. 26 May, 2015 1 commit
  10. 19 Mar, 2015 1 commit
  11. 08 Jan, 2015 1 commit
  12. 18 Dec, 2014 1 commit
  13. 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
      include.)
      3bfb163a
  14. 05 Oct, 2014 1 commit
  15. 07 Aug, 2014 1 commit
  16. 01 Aug, 2014 2 commits
    • Dan Winship's avatar
      libnm-glib: fix a crash when using multiple NMClients · fe264a2d
      Dan Winship authored
      NMObjectCache was assuming there would never be more than one object
      with the same path, but since NMClient is an NMObject, it was getting
      cached too, so if you created two clients and then unreffed one of
      them, it's possible the wrong one could get left in the cache, causing
      a crash the next time the other one called nm_object_cache_clear().
      
      Fix this by only adding NMObjects to the cache in the codepaths where
      we also check to see if the object was already in the cache.
      
      (This also means we can remove the "except" argument to
      nm_object_cache_clear(), since the NMClient won't be cached any more.)
      fe264a2d
    • Giovanni Campagna's avatar
      libnm-glib: disconnect the connectivity check cancellable signal after the... · 07046462
      Giovanni Campagna authored
      libnm-glib: disconnect the connectivity check cancellable signal after the call has ended (bgo #733915)
      
      We cannot rely on connectivity data freeing to disconnect the signal,
      because the simple async result might be kept alive by external
      code (for example the language runtime for JS), but we must not
      call dbus_g_proxy_cancel_call() if that cancellable is cancelled or
      reused afterwards.
      
      https://bugzilla.gnome.org/show_bug.cgi?id=733915
      07046462
  17. 27 Jul, 2014 1 commit
    • Thomas Haller's avatar
      libnm-glib: fix gtk-doc for NMClient:active-connections · 7f35d808
      Thomas Haller authored
      Since previous commit dafe51e8,
      the gtk-doc is no longer ignored. However, the angle brackets
      add invalid XML characters to ./docs/libnm-glib/xml/nm-client.xml
      This breaks the build.
      
          make[3]: Entering directory `./NetworkManager/docs/libnm-glib'
            DOC   Scanning header files
            DOC   Introspecting gobjects
            DOC   Building HTML
          ../xml/nm-client.xml:1110: parser error : Opening and ending tag mismatch: NMActiveConnection line 1109 and para
          </para></refsect2>
                 ^
          ../xml/nm-client.xml:1110: parser error : Opening and ending tag mismatch: para line 1107 and refsect2
          </para></refsect2>
                            ^
          ../xml/nm-client.xml:1211: parser error : Opening and ending tag mismatch: refsect2 line 1104 and refsect1
          </refsect1>
                     ^
          ../xml/nm-client.xml:1262: parser error : Opening and ending tag mismatch: refsect1 line 1095 and refentry
          </refentry>
                     ^
          ../xml/nm-client.xml:1263: parser error : Premature end of data in tag refentry line 7
      
          ^
          ../libnm-glib-docs.xml:67: element include: XInclude error : could not load ../xml/nm-client.xml, and no fallback was found
          make[3]: *** [html-build.stamp] Error 6
      Signed-off-by: Thomas Haller's avatarThomas Haller <thaller@redhat.com>
      7f35d808
  18. 25 Jul, 2014 1 commit
    • Dan Winship's avatar
      libnm-glib: document some properties · dafe51e8
      Dan Winship authored
      Some libnm-glib object properties were only documented in the
      GParamSpec strings, not via gtk-doc comments, so they became
      undocumented when the paramspec strings went away. Fix that.
      
      (Also fix incorrect gtk-doc syntax with several NMClient properties.)
      dafe51e8
  19. 15 Jul, 2014 3 commits
    • Dan Winship's avatar
      libnm-util, libnm-glib: whitespace fixes · 2570c5a1
      Dan Winship authored
      Fix indentation, kill trailing whitespace, split some long lines.
      2570c5a1
    • Dan Winship's avatar
      libnm-util, libnm-glib: standardize copyright/license headers · cb7e1893
      Dan Winship authored
      - Remove list of authors from files that had them; these serve no
        purpose except to quickly get out of date (and were only used in
        libnm-util and not libnm-glib anyway).
      
      - Just say "Copyright", not "(C) Copyright" or "Copyright (C)"
      
      - Put copyright statement after the license, not before
      
      - Remove "NetworkManager - Network link manager" from the few files
        that contained it, and "libnm_glib -- Access network status &
        information from glib applications" from the many files that
        contained it.
      
      - Remove vim modeline from nm-device-olpc-mesh.[ch], add emacs modeline
        to files that were missing it.
      cb7e1893
    • Dan Winship's avatar
      libnm-util, libnm-glib: tweak (element-type) annotations in docs · 4223fa47
      Dan Winship authored
      g-i allows you to specify types in annotations using either their
      fully-qualified introspected names (eg, "NMClient.Device") or their
      plain C names ("NMDevice"). Switch from the former to the latter (so
      that they'll still be correct when migrated to libnm later).
      4223fa47
  20. 19 Jun, 2014 2 commits
  21. 23 Jan, 2014 1 commit
  22. 13 Nov, 2013 1 commit
  23. 31 Oct, 2013 1 commit
  24. 22 Oct, 2013 1 commit
    • Thomas Haller's avatar
      core: cleanup freeing of glib collections of pointers · 3eb1d5e9
      Thomas Haller authored
      When freeing one of the collections such as GArray, GPtrArray, GSList,
      etc. it is common that the items inside the connections must be
      freed/unrefed too.
      
      The previous code often iterated over the collection first with
      e.g. g_ptr_array_foreach and passing e.g. g_free as GFunc argument.
      For one, this has the problem, that g_free has a different signature
      GDestroyNotify then the expected GFunc. Moreover, this can be
      simplified either by setting a clear function
      (g_ptr_array_set_clear_func) or by passing the destroy function to the
      free function (g_slist_free_full).
      Signed-off-by: Thomas Haller's avatarThomas Haller <thaller@redhat.com>
      3eb1d5e9
  25. 14 Oct, 2013 1 commit
  26. 11 Oct, 2013 1 commit
    • Dan Winship's avatar
      libnm-util, libnm-glib: fix up some gtk-doc comments · 76cc2bd9
      Dan Winship authored
      gtk-doc recognizes that #NMFoos is the plural of #NMFoo now, so you
      don't need to put an empty comment between the type name and the "s"
      to make it work. (Unfortunately, it's not smart enough to realize that
      "NMIP4Addresses" is the plural of "NMIP4Address".)
      
      Also, add some missing "#"s noticed along the way.
      76cc2bd9
  27. 03 Oct, 2013 1 commit
  28. 11 Sep, 2013 1 commit
  29. 28 Aug, 2013 2 commits
  30. 16 Aug, 2013 1 commit
  31. 08 May, 2013 1 commit
  32. 19 Apr, 2013 1 commit
    • Martin Pitt's avatar
      Use %NULL macro in doc strings · 57a9fb3c
      Martin Pitt authored
      Mass-converted "NULL" to "%NULL" in docstrings with
      
        find -name '*.c'| xargs sed -i '/^ \*.*[^%]NULL/ s/NULL\b/%NULL/g'
      57a9fb3c
  33. 08 Apr, 2013 1 commit
    • Dan Williams's avatar
      libnm-glib: never call NM D-Bus methods if NM isn't running · 110a4035
      Dan Williams authored
      Though the client shouldn't be calling anything when NM isn't running
      (because clients have nm_client_get_manager_running()), make sure
      that NMClient never calls a NetworkManager method when NM isn't
      on the bus.
      
      Next, ensure NMObject doesn't try to refresh properties when NM isn't
      running.  Creating an NMClient may trigger a property refresh request,
      but if NM isn't running, defer that until NM starts, to ensure that
      we don't D-Bus autostart NM.
      
      Third, ensure NMRemoteSettings doesn't attempt to list connections
      unless NM is running.
      
      This prevents service activation of NetworkManager in lieu of dbus-glib
      learning about DBUS_HEADER_FLAG_NO_AUTO_START.
      110a4035