diff options
| author | Michael Biebl <biebl@debian.org> | 2016-08-26 02:18:32 +0200 |
|---|---|---|
| committer | Michael Biebl <biebl@debian.org> | 2016-08-26 02:18:32 +0200 |
| commit | 7514efc2f38c9ace4557d4e69d68e7d380389030 (patch) | |
| tree | 7fb00fda86cfcc2ca377f191633a7cfdbfea7ca3 /src/ppp-manager | |
| parent | d6201f5d8daada3d64a0a3e0038e14eebec683ce (diff) | |
Imported Upstream version 1.4.0 upstream/1.4.0
Diffstat (limited to 'src/ppp-manager')
| -rw-r--r-- | src/ppp-manager/Makefile.am | 3 | ||||
| -rw-r--r-- | src/ppp-manager/Makefile.in | 20 | ||||
| -rw-r--r-- | src/ppp-manager/nm-ppp-manager.c | 22 | ||||
| -rw-r--r-- | src/ppp-manager/nm-pppd-plugin.c | 2 |
4 files changed, 26 insertions, 21 deletions
diff --git a/src/ppp-manager/Makefile.am b/src/ppp-manager/Makefile.am index 7d3e503b..3026dab4 100644 --- a/src/ppp-manager/Makefile.am +++ b/src/ppp-manager/Makefile.am @@ -22,6 +22,7 @@ nm_pppd_plugin_la_LDFLAGS = -module -avoid-version nm_pppd_plugin_la_LIBADD = \ $(GLIB_LIBS) \ - -ldl + $(DL_LIBS) \ + $(NULL) endif diff --git a/src/ppp-manager/Makefile.in b/src/ppp-manager/Makefile.in index c80ae6bc..b8215aab 100644 --- a/src/ppp-manager/Makefile.in +++ b/src/ppp-manager/Makefile.in @@ -90,8 +90,9 @@ build_triplet = @build@ host_triplet = @host@ subdir = src/ppp-manager ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/ax_lib_readline.m4 \ - $(top_srcdir)/m4/compiler_warnings.m4 \ +am__aclocal_m4_deps = $(top_srcdir)/m4/attributes.m4 \ + $(top_srcdir)/m4/ax_lib_readline.m4 \ + $(top_srcdir)/m4/compiler_options.m4 \ $(top_srcdir)/m4/gettext.m4 \ $(top_srcdir)/m4/gnome-code-coverage.m4 \ $(top_srcdir)/m4/gtk-doc.m4 $(top_srcdir)/m4/iconv.m4 \ @@ -140,7 +141,8 @@ am__uninstall_files_from_dir = { \ am__installdirs = "$(DESTDIR)$(pppd_plugindir)" LTLIBRARIES = $(pppd_plugin_LTLIBRARIES) am__DEPENDENCIES_1 = -@WITH_PPP_TRUE@nm_pppd_plugin_la_DEPENDENCIES = $(am__DEPENDENCIES_1) +@WITH_PPP_TRUE@nm_pppd_plugin_la_DEPENDENCIES = $(am__DEPENDENCIES_1) \ +@WITH_PPP_TRUE@ $(am__DEPENDENCIES_1) am__nm_pppd_plugin_la_SOURCES_DIST = nm-pppd-plugin.c nm-pppd-plugin.h \ nm-ppp-status.h @WITH_PPP_TRUE@am_nm_pppd_plugin_la_OBJECTS = nm-pppd-plugin.lo @@ -251,6 +253,7 @@ DHCLIENT_PATH = @DHCLIENT_PATH@ DHCPCD_PATH = @DHCPCD_PATH@ DISTRO_NETWORK_SERVICE = @DISTRO_NETWORK_SERVICE@ DLLTOOL = @DLLTOOL@ +DL_LIBS = @DL_LIBS@ DNSMASQ_PATH = @DNSMASQ_PATH@ DNSSEC_TRIGGER_SCRIPT = @DNSSEC_TRIGGER_SCRIPT@ DSYMUTIL = @DSYMUTIL@ @@ -307,13 +310,14 @@ INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@ INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@ INTROSPECTION_TYPELIBDIR = @INTROSPECTION_TYPELIBDIR@ IPTABLES_PATH = @IPTABLES_PATH@ +JANSSON_CFLAGS = @JANSSON_CFLAGS@ +JANSSON_LIBS = @JANSSON_LIBS@ KERNEL_FIRMWARE_DIR = @KERNEL_FIRMWARE_DIR@ LCOV = @LCOV@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBAUDIT_CFLAGS = @LIBAUDIT_CFLAGS@ LIBAUDIT_LIBS = @LIBAUDIT_LIBS@ -LIBDL = @LIBDL@ LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ LIBM = @LIBM@ @@ -325,6 +329,8 @@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBSOUP_CFLAGS = @LIBSOUP_CFLAGS@ LIBSOUP_LIBS = @LIBSOUP_LIBS@ +LIBSYSTEMD_CFLAGS = @LIBSYSTEMD_CFLAGS@ +LIBSYSTEMD_LIBS = @LIBSYSTEMD_LIBS@ LIBTEAMDCTL_CFLAGS = @LIBTEAMDCTL_CFLAGS@ LIBTEAMDCTL_LIBS = @LIBTEAMDCTL_LIBS@ LIBTOOL = @LIBTOOL@ @@ -385,6 +391,8 @@ QT_CFLAGS = @QT_CFLAGS@ QT_LIBS = @QT_LIBS@ RANLIB = @RANLIB@ READLINE_LIBS = @READLINE_LIBS@ +SANITIZERS = @SANITIZERS@ +SANITIZER_ENV = @SANITIZER_ENV@ SED = @SED@ SELINUX_CFLAGS = @SELINUX_CFLAGS@ SELINUX_LIBS = @SELINUX_LIBS@ @@ -420,6 +428,7 @@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +ac_ct_RANLIB = @ac_ct_RANLIB@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ @@ -501,7 +510,8 @@ with_valgrind = @with_valgrind@ @WITH_PPP_TRUE@nm_pppd_plugin_la_LDFLAGS = -module -avoid-version @WITH_PPP_TRUE@nm_pppd_plugin_la_LIBADD = \ @WITH_PPP_TRUE@ $(GLIB_LIBS) \ -@WITH_PPP_TRUE@ -ldl +@WITH_PPP_TRUE@ $(DL_LIBS) \ +@WITH_PPP_TRUE@ $(NULL) all: all-am diff --git a/src/ppp-manager/nm-ppp-manager.c b/src/ppp-manager/nm-ppp-manager.c index 89a7addf..a51f7cfa 100644 --- a/src/ppp-manager/nm-ppp-manager.c +++ b/src/ppp-manager/nm-ppp-manager.c @@ -482,7 +482,7 @@ impl_ppp_manager_set_ip4_config (NMPPPManager *manager, address.plen = u32; if (address.address && address.plen && address.plen <= 32) { - address.source = NM_IP_CONFIG_SOURCE_PPP; + address.addr_source = NM_IP_CONFIG_SOURCE_PPP; nm_ip4_config_add_address (config, &address); } else { _LOGE ("invalid IPv4 address received!"); @@ -540,7 +540,7 @@ iid_value_to_ll6_addr (GVariant *dict, out_addr->s6_addr16[0] = htons (0xfe80); memcpy (out_addr->s6_addr + 8, &iid, sizeof (iid)); if (out_iid) - nm_utils_ipv6_interface_identfier_get_from_addr (out_iid, out_addr); + nm_utils_ipv6_interface_identifier_get_from_addr (out_iid, out_addr); return TRUE; } @@ -1028,7 +1028,7 @@ nm_ppp_manager_start (NMPPPManager *manager, NMPPPManagerPrivate *priv; NMConnection *connection; NMSettingPpp *s_ppp; - gboolean s_ppp_created = FALSE; + gs_unref_object NMSettingPpp *s_ppp_free = NULL; NMSettingPppoe *pppoe_setting; NMSettingAdsl *adsl_setting; NMCmdLine *ppp_cmd; @@ -1056,24 +1056,21 @@ nm_ppp_manager_start (NMPPPManager *manager, nm_utils_modprobe (NULL, FALSE, "ppp_generic", NULL); connection = nm_act_request_get_applied_connection (req); - g_assert (connection); + g_return_val_if_fail (connection, FALSE); s_ppp = nm_connection_get_setting_ppp (connection); if (!s_ppp) { /* If the PPP settings are all default we may not have a PPP setting yet, * so just make a default one here. */ - s_ppp = NM_SETTING_PPP (nm_setting_ppp_new ()); - s_ppp_created = TRUE; + s_ppp = s_ppp_free = NM_SETTING_PPP (nm_setting_ppp_new ()); } - + pppoe_setting = nm_connection_get_setting_pppoe (connection); if (pppoe_setting) { /* We can't modify the applied connection's setting, make a copy */ - if (!s_ppp_created) { - s_ppp = NM_SETTING_PPP (nm_setting_duplicate ((NMSetting *) s_ppp)); - s_ppp_created = TRUE; - } + if (!s_ppp_free) + s_ppp = s_ppp_free = NM_SETTING_PPP (nm_setting_duplicate ((NMSetting *) s_ppp)); pppoe_fill_defaults (s_ppp); } @@ -1106,9 +1103,6 @@ nm_ppp_manager_start (NMPPPManager *manager, priv->act_req = g_object_ref (req); out: - if (s_ppp_created) - g_object_unref (s_ppp); - if (ppp_cmd) nm_cmd_line_destroy (ppp_cmd); diff --git a/src/ppp-manager/nm-pppd-plugin.c b/src/ppp-manager/nm-pppd-plugin.c index 4c16f1f0..9c47c339 100644 --- a/src/ppp-manager/nm-pppd-plugin.c +++ b/src/ppp-manager/nm-pppd-plugin.c @@ -19,7 +19,7 @@ * Copyright (C) 2008 Red Hat, Inc. */ -#include "config.h" +#include <config.h> #define ___CONFIG_H__ #include <string.h> |