diff options
| author | Michael Biebl <biebl@debian.org> | 2018-05-11 22:08:45 +0200 |
|---|---|---|
| committer | Michael Biebl <biebl@debian.org> | 2018-05-11 22:08:45 +0200 |
| commit | ee9c73a923909e23a649407be77e25235d769e25 (patch) | |
| tree | e21c923621fa278e737da693df9eb60ea31a6067 /dispatcher | |
| parent | f60117b41d5433be1b4a96d82cd11d0c3dce9b63 (diff) | |
New upstream version 1.10.8 upstream/1.10.8
Diffstat (limited to 'dispatcher')
| -rw-r--r-- | dispatcher/meson.build | 71 | ||||
| -rw-r--r-- | dispatcher/nm-dispatcher.c | 4 | ||||
| -rw-r--r-- | dispatcher/tests/meson.build | 27 | ||||
| -rw-r--r-- | dispatcher/tests/test-dispatcher-envp.c | 1 |
4 files changed, 4 insertions, 99 deletions
diff --git a/dispatcher/meson.build b/dispatcher/meson.build deleted file mode 100644 index 5859a6ed..00000000 --- a/dispatcher/meson.build +++ /dev/null @@ -1,71 +0,0 @@ -dispatcher_inc = include_directories('.') - -name = 'nm-dispatcher' - -service_conf = configuration_data() -service_conf.set('sbindir', nm_sbindir) -service_conf.set('sysconfdir', nm_sysconfdir) -service_conf.set('localstatedir', nm_localstatedir) -service_conf.set('libexecdir', nm_libexecdir) - -service = 'org.freedesktop.nm_dispatcher.service' - -configure_file( - input: service + '.in', - output: service, - install: true, - install_dir: dbus_sys_dir, - configuration: service_conf -) - -install_data( - 'nm-dispatcher.conf', - install_dir: dbus_conf_dir -) - -sources = files('nm-dispatcher-utils.c') - -deps = [ - libnm_dep, - nm_core_dep -] - -cflags = [ - '-DLIBEXECDIR="@0@"'.format(nm_libexecdir), - '-DSYSCONFDIR="@0@"'.format(nm_sysconfdir), - '-DNMCONFDIR="@0@"'.format(nm_pkgconfdir), - '-DG_LOG_DOMAIN="@0@"'.format(name), - '-DNETWORKMANAGER_COMPILATION=NM_NETWORKMANAGER_COMPILATION_CLIENT', -] - -libnm_dispatcher_core = static_library( - name + '-core', - sources: sources, - dependencies: deps, - c_args: cflags -) - -sources = files('nm-dispatcher.c') - -sources += gnome.gdbus_codegen( - 'nmdbus-dispatcher', - name + '.xml', - interface_prefix: 'org.freedesktop', - namespace: 'NMDBus' -) - -executable( - name, - sources, - dependencies: deps, - c_args: cflags, - link_with: libnm_dispatcher_core, - link_args: ldflags_linker_script_binary, - link_depends: linker_script_binary, - install: true, - install_dir: nm_libexecdir -) - -if enable_tests - subdir('tests') -endif diff --git a/dispatcher/nm-dispatcher.c b/dispatcher/nm-dispatcher.c index efab0a53..6bb52218 100644 --- a/dispatcher/nm-dispatcher.c +++ b/dispatcher/nm-dispatcher.c @@ -604,7 +604,7 @@ find_scripts (const char *str_action) while ((filename = g_dir_read_name (dir))) { char *path; - struct stat st; + struct stat st; int err; const char *err_msg = NULL; @@ -916,6 +916,8 @@ main (int argc, char **argv) g_option_context_free (opt_ctx); + nm_g_type_init (); + g_unix_signal_add (SIGTERM, signal_handler, GINT_TO_POINTER (SIGTERM)); g_unix_signal_add (SIGINT, signal_handler, GINT_TO_POINTER (SIGINT)); diff --git a/dispatcher/tests/meson.build b/dispatcher/tests/meson.build deleted file mode 100644 index 1368a1f3..00000000 --- a/dispatcher/tests/meson.build +++ /dev/null @@ -1,27 +0,0 @@ -test_unit = 'test-dispatcher-envp' - -incs = [ - dispatcher_inc, - libnm_inc -] - -cflags = [ - '-DNETWORKMANAGER_COMPILATION_TEST', - '-DNETWORKMANAGER_COMPILATION=NM_NETWORKMANAGER_COMPILATION_CLIENT', - '-DSRCDIR="@0@"'.format(meson.current_source_dir()), -] - -exe = executable( - test_unit, - test_unit + '.c', - include_directories: incs, - dependencies: nm_core_dep, - c_args: cflags, - link_with: libnm_dispatcher_core -) - -test( - 'dispatcher/' + test_unit, - test_script, - args: test_args + [exe.full_path()] -) diff --git a/dispatcher/tests/test-dispatcher-envp.c b/dispatcher/tests/test-dispatcher-envp.c index 25cd5e60..6dd4db07 100644 --- a/dispatcher/tests/test-dispatcher-envp.c +++ b/dispatcher/tests/test-dispatcher-envp.c @@ -24,6 +24,7 @@ #include <stdlib.h> #include <string.h> +#include "nm-core-internal.h" #include "nm-dispatcher-utils.h" #include "nm-dispatcher-api.h" |