1. 13 Apr, 2018 1 commit
  2. 12 Apr, 2018 3 commits
  3. 26 Mar, 2018 1 commit
  4. 08 Mar, 2018 1 commit
    • Benjamin Berg's avatar
      Add calls to g_simple_async_result_set_check_cancellable · 26c215e2
      Benjamin Berg authored
      If an operation is cancelled through the GCancellable, then the idiom is
      that the operation is always cancelled, even if it has finished
      successfully. To ensure this is the case, add calls to
      g_simple_async_result_set_check_cancellable everywhere.
      
      Without this, e.g. gnome-control-center will crash when switching away
      from the power panel quickly, as the NMClient creation finishes
      asynchronously and g-c-c assume that G_IO_ERROR_CANCELLED is returned to
      ensure it doesn't access the now invalid user_data parameter.
      
      https://bugzilla.gnome.org/show_bug.cgi?id=794088
      26c215e2
  5. 08 Feb, 2018 2 commits
    • Lubomir Rintel's avatar
      all: fix -Wcast-function-type warnings · ee916a1e
      Lubomir Rintel authored
      GCC 8.0's -Wcast-function-type objects casting function pointers to ones
      with incompatible prototypes. Sometimes we do that on purpose though.
      
      Notably, the g_source_set_callback()'s func argument can point to functions
      of various prototypes. Also, libnm-glib/nm-remote-connection is perhaps
      just not worth reworking, that would just be a waste of time.
      
      A cast to void(*)(void) avoids the GCC warning, let's use it.
      ee916a1e
    • Lubomir Rintel's avatar
      libnm/vpn-plugin: avoid bad function pointer type casts · 7f7207f3
      Lubomir Rintel authored
      This makes GCC 8.0 unhappy and it is probably right about that -- it's more
      difficult to get things wrong when the function prototypes actually match.
      7f7207f3
  6. 07 Feb, 2018 2 commits
  7. 18 Jan, 2018 1 commit
  8. 16 Jan, 2018 1 commit
  9. 12 Jan, 2018 1 commit
  10. 11 Jan, 2018 1 commit
  11. 10 Jan, 2018 4 commits
    • Thomas Haller's avatar
      build/meson: unconditionally use linker version scripts · 349861ce
      Thomas Haller authored
      We also unconditionally use them with autotools.
      Also, the detection for have_version_script does
      not seem correct to me. At least, it didn't work
      with clang.
      349861ce
    • Thomas Haller's avatar
      build/meson: disable unit tests that are known to fail · 3d7aa848
      Thomas Haller authored
      I think it's because meson doesn't run the tests in their
      own D-Bus session, hence the use the system service.
      
      automake solves this running all tests via ./tools/run-nm-test.sh,
      which knows how to prepare a suitable environment for the tests.
      3d7aa848
    • Inigo Martínez's avatar
      meson: Use string variables extensively · 50930ed1
      Inigo Martínez authored
      The strings holding the names used for libraries have also been
      moved to different variables. This way they would be less error
      as these variables can be reused easily and any typing error
      would be quickly detected.
      50930ed1
    • Inigo Martínez's avatar
      meson: Improve dependency system · 5e16bcf2
      Inigo Martínez authored
      Some targets are missing dependencies on some generated sources in
      the meson port. These makes the build to fail due to missing source
      files on a highly parallelized build.
      
      These dependencies have been resolved by taking advantage of meson's
      internal dependencies which can be used to pass source files,
      include directories, libraries and compiler flags.
      
      One of such internal dependencies called `core_dep` was already in
      use. However, in order to avoid any confusion with another new
      internal dependency called `nm_core_dep`, which is used to include
      directories and source files from the `libnm-core` directory, the
      `core_dep` dependency has been renamed to `nm_dep`.
      
      These changes have allowed minimizing the build details which are
      inherited by using those dependencies. The parallelized build has
      also been improved.
      5e16bcf2
  12. 08 Jan, 2018 1 commit
    • Thomas Haller's avatar
      build: refine the NETWORKMANAGER_COMPILATION define · 22ef6a50
      Thomas Haller authored
      Note that:
      
       - we compile some source files multiple times. Most notably those
         under "shared/".
      
       - we include a default header "shared/nm-default.h" in every source
         file. This header is supposed to setup a common environment by defining
         and including parts that are commonly used. As we always include the
         same header, the header must behave differently depending
         one whether the compilation is for libnm-core, NetworkManager or
         libnm-glib. E.g. it must include <glib/gi18n.h> or <glib/gi18n-lib.h>
         depending on whether we compile a library or an application.
      
      For that, the source files need the NETWORKMANAGER_COMPILATION #define
      to behave accordingly.
      
      Extend the define to be composed of flags. These flags are all named
      NM_NETWORKMANAGER_COMPILATION_WITH_*, they indicate which part of the
      build are available. E.g. when building libnm-core.la itself, then
      WITH_LIBNM_CORE, WITH_LIBNM_CORE_INTERNAL, and WITH_LIBNM_CORE_PRIVATE
      are available. When building NetworkManager, WITH_LIBNM_CORE_PRIVATE
      is not available but the internal parts are still accessible. When
      building nmcli, only WITH_LIBNM_CORE (the public part) is available.
      This granularily controls the build.
      22ef6a50
  13. 02 Jan, 2018 1 commit
  14. 18 Dec, 2017 1 commit
  15. 14 Dec, 2017 1 commit
  16. 13 Dec, 2017 1 commit
  17. 06 Dec, 2017 2 commits
  18. 16 Nov, 2017 1 commit
    • Thomas Haller's avatar
      all: don't use g_direct_equal() for hash table equality function · b58481b3
      Thomas Haller authored
      GHashTable optimizes a NULL equality function to use direct pointer
      comparison. That saves the overhead of calling g_direct_equal().
      This is also documented behavior for g_hash_table_new().
      
      While at it, also don't pass g_direct_hash() but use the default
      of %NULL. The behavior is the same, but consistently don't use
      g_direct_hash().
      b58481b3
  19. 28 May, 2017 1 commit
  20. 13 Apr, 2017 2 commits
  21. 24 Mar, 2017 1 commit
  22. 22 Mar, 2017 2 commits
  23. 20 Mar, 2017 1 commit
  24. 09 Mar, 2017 1 commit
    • Thomas Haller's avatar
      include: use double-quotes to include our own headers · 831286df
      Thomas Haller authored
      In practice, this should only matter when there are multiple
      header files with the same name. That is something we try
      to avoid already, by giving headers a distinct name.
      
      When building NetworkManager itself, we clearly want to use
      double-quotes for including our own headers.
      But we also want to do that in our public headers. For example:
      
        ./a.c
          #include <stdio.h>
          #include <nm-1.h>
          void main() {
              printf ("INCLUDED %s/nm-2.h\n", SYMB);
          }
      
        ./1/nm-1.h
          #include <nm-2.h>
      
        ./1/nm-2.h
          #define SYMB "1"
      
        ./2/nm-2.h
          #define SYMB "2"
      
      $ cc -I./2 -I./1 ./a.c
      $ ./a.out
      INCLUDED 2/nm-2.h
      
      Exceptions to this are
        - headers in "shared/nm-utils" that include <NetworkManager.h>. These
          headers are copied into projects and hence used like headers owned by
          those projects.
        - examples/C
      831286df
  25. 08 Mar, 2017 1 commit
  26. 15 Feb, 2017 2 commits
  27. 21 Nov, 2016 2 commits
    • Lubomir Rintel's avatar
      libnm-glib: silence some build warnings · 4fac787d
      Lubomir Rintel authored
      libnm-glib/nm-object-private.h:28: Warning: NMClient: symbol='PropertyMarshalFunc': missing parameter name; undocumentable
      libnm-glib/nm-object-private.h:28: Warning: NMClient: symbol='PropertyMarshalFunc': missing parameter name; undocumentable
      libnm-glib/nm-object-private.h:28: Warning: NMClient: symbol='PropertyMarshalFunc': missing parameter name; undocumentable
      libnm-glib/nm-object-private.h:28: Warning: NMClient: symbol='PropertyMarshalFunc': missing parameter name; undocumentable
      
      libnm-glib/nm-object-private.h:82: Warning: NMClient: symbol='NMObjectTypeFunc': missing parameter name; undocumentable
      libnm-glib/nm-object-private.h:82: Warning: NMClient: symbol='NMObjectTypeFunc': missing parameter name; undocumentable
      
      libnm-glib/nm-object-private.h:83: Warning: NMClient: symbol='NMObjectTypeCallbackFunc': missing parameter name; undocumentable
      libnm-glib/nm-object-private.h:83: Warning: NMClient: symbol='NMObjectTypeCallbackFunc': missing parameter name; undocumentable
      
      libnm-glib/nm-object-private.h:84: Warning: NMClient: symbol='NMObjectTypeAsyncFunc': missing parameter name; undocumentable
      libnm-glib/nm-object-private.h:84: Warning: NMClient: symbol='NMObjectTypeAsyncFunc': missing parameter name; undocumentable
      libnm-glib/nm-object-private.h:84: Warning: NMClient: symbol='NMObjectTypeAsyncFunc': missing parameter name; undocumentable
      libnm-glib/nm-object-private.h:84: Warning: NMClient: symbol='NMObjectTypeAsyncFunc': missing parameter name; undocumentable
      4fac787d
    • Lubomir Rintel's avatar
      libnm-glib: drop some unneeded code · 418e2a36
      Lubomir Rintel authored
      ...so that we don't have to fix the following:
      
      libnm-glib/nm-object-private.h:30: Warning: NMClient: symbol='NMObjectCreatorFunc': missing parameter name; undocumentable
      libnm-glib/nm-object-private.h:30: Warning: NMClient: symbol='NMObjectCreatorFunc': missing parameter name; undocumentable
      
      Fixes: ad5daa09
      418e2a36
  28. 21 Oct, 2016 1 commit