1. 17 Sep, 2018 1 commit
  2. 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' \
  3. 18 Jan, 2018 1 commit
  4. 23 Mar, 2017 1 commit
    • Thomas Haller's avatar
      build: don't link against libm.so · 0fefcbfb
      Thomas Haller authored
      There are very few places where we actually use floating point
      or #include <math.h>.
      Drop that library, although we very likely still get it as indirect
      dependency (e.g. on my system it is still dragged in by libsystemd.so,
      libudev.so and libnl-3.so).
  5. 03 Oct, 2016 1 commit
  6. 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
  7. 10 Aug, 2015 1 commit
    • Dan Winship's avatar
      core: final gdbus porting · 1cf35cb2
      Dan Winship authored
      Port remaining bits to gdbus and remove stray dbus-glib references
      Drop the dbus-glib version check from configure, since nothing depends
      on new dbus-glib any more.
      Move nm-dbus-glib-types.h and nm-gvaluearray-compat.h from include/ to
      libnm-util/ since they are now only used by libnm-util and libnm-glib.
  8. 05 Aug, 2015 1 commit
  9. 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).
  10. 12 Jul, 2015 1 commit
  11. 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
  12. 15 Jul, 2014 2 commits
    • Dan Winship's avatar
      libnm-util, libnm-glib: whitespace fixes · 2570c5a1
      Dan Winship authored
      Fix indentation, kill trailing whitespace, split some long lines.
    • 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.
  13. 27 May, 2014 1 commit
  14. 07 Nov, 2013 1 commit
  15. 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>
  16. 25 Mar, 2013 1 commit
  17. 23 Jul, 2012 1 commit
  18. 28 Oct, 2011 1 commit
  19. 12 Oct, 2011 1 commit
  20. 10 Oct, 2011 1 commit
  21. 03 Oct, 2011 1 commit
  22. 19 Jul, 2011 1 commit
    • Dan Williams's avatar
      libnm-util: rename symbol to fix export check · d45e9cb0
      Dan Williams authored
      The export check looks for symbols that begin with "nm_" (except
      for GObject class stuff) which indicate that the symbol should be
      exported.  If the symbols is 'l' (local) as reported by objdump
      that probably means we forgot to add it to the .ver file and it
      really should be exported.  nm_gvalue_dup() shouldn't be exported
      though, so rename it such that it's obviously internal.
  23. 05 May, 2011 1 commit
    • Dan Williams's avatar
      libnm-util: fix symbol export checks to catch un-exported ones too · 07c9de48
      Dan Williams authored
      The current check caught stuff in the .ver file that was outdated, but
      didn't quite get stuff that was supposed to be exported but wasn't,
      in some cases.  Update the regex to ensure that symbols that are
      not exported, but that start with "nm_" (and aren't GObject
      boilerplate) get flagged during the check.
      Update internal code to return to a previous pattern of treating symbols
      that start with "_" internal, and expecting symbols that start with
      "nm_" to be exported.
      Also fixes cases where random glibc symbols would get flagged:
      00040ff4 l     O *ABS*  00000000              .hidden _GLOBAL_OFFSET_TABLE_
      00041380 l     O .data  00000000              .hidden __dso_handle
      000406e8 l     O .dtors 00000000              .hidden __DTOR_END__
      0000fbe4 l     F .text  00000000              .hidden __i686.get_pc_thunk.cx
      0002f980 l     F .text  00000014              .hidden __stack_chk_fail_local
      0000b1e7 l     F .text  00000000              .hidden __i686.get_pc_thunk.bx
      00040e60 l     O *ABS*  00000000              .hidden _DYNAMIC
  24. 19 Apr, 2010 1 commit
    • Dan Williams's avatar
      libnm-util: convert from old IP6 address format to new · 83652e6b
      Dan Williams authored
      Ensure it still works correctly if something tries to set the
      'addresses' property using the old GType.  Also make sure that
      the various IP6 address comparison operations and string conversion
      functions handle the gateway.
  25. 06 Jan, 2010 1 commit
  26. 01 Oct, 2008 1 commit
    • Dan Williams's avatar
      2008-10-01 Dan Williams <dcbw@redhat.com> · 95798eb4
      Dan Williams authored
      	Fix setting value comparison issue that caused some settings to look the
      	same when they were really different (rh #464417)
      	* libnm-util/nm-param-spec-specialized.c
      		- (type_is_fixed_size): return fundamental size of the fixed type too
      		- (nm_gvalues_compare_collection): use the fundamental fixed type size
      			in the comparison so that the _entire_ fixed type collection gets
      			compared rather than just the first 'len1' bytes
      git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@4134 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
  27. 26 Aug, 2008 1 commit
  28. 27 Jul, 2008 1 commit
  29. 26 Nov, 2007 1 commit
  30. 07 Nov, 2007 1 commit
    • Tambet Ingo's avatar
      2007-11-07 Tambet Ingo <tambet@gmail.com> · 6b79d40a
      Tambet Ingo authored
              Rework NMSetting structures: Move each setting to it's own file.
              Convert to GObject. Remove home grown setting types and use
              Use GObject property introspection for hash conversion,
              properties, etc.
              * libnm-util/nm-setting-connection.[ch]
              * libnm-util/nm-setting-ip4-config.[ch]
              * libnm-util/nm-setting-ppp.[ch]
              * libnm-util/nm-setting-vpn.[ch]
              * libnm-util/nm-setting-vpn-properties.[ch]
              * libnm-util/nm-setting-wired.[ch]
              * libnm-util/nm-setting-wireless.[ch]
              * libnm-util/nm-setting-wireless-security.[ch]
              New files, each containing a setting.
              * libnm-util/nm-setting-template.[ch]: A template for creating
              * new
              settings. To use it, just replace 'template' with the new
              name, and you're half-way done.
              * libnm-util/nm-setting.c: Convert to GObject and use GObject
              introspection instead of internal types and tables.
              * libnm-util/nm-connection.c: Adapt the new NMSetting work.
              * libnm-util/nm-param-spec-specialized.[ch]: Implement. Handles
              GValue types defined by dbus-glib for composed types like
              structures and maps.
              * src/*: The API of NMSetting and NMConnection changed a bit:
              * Getting
              a setting from connection takes the setting type now. Also,
              the settings are in multiple files, include relevant settings.
      git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3068 4912f4e0-d625-0410-9fb7-b9a5a253dbdc