diff options
| author | Michael Biebl <biebl@debian.org> | 2018-10-20 01:30:31 +0200 |
|---|---|---|
| committer | Michael Biebl <biebl@debian.org> | 2018-10-20 01:30:31 +0200 |
| commit | 6518e361171f64bcaaa4bf868139362ed95cc2e0 (patch) | |
| tree | d2d5b53faf80646a40ec2c0c7f2a42b3959612f5 /src/ppp | |
| parent | e126f3e804c35480c4f075777430419d6ece23da (diff) | |
New upstream version 1.14.2 upstream/1.14.2
Diffstat (limited to 'src/ppp')
| -rw-r--r-- | src/ppp/meson.build | 1 | ||||
| -rw-r--r-- | src/ppp/nm-ppp-manager.c | 20 | ||||
| -rw-r--r-- | src/ppp/nm-pppd-plugin.c | 2 |
3 files changed, 12 insertions, 11 deletions
diff --git a/src/ppp/meson.build b/src/ppp/meson.build index 38f9a0f1..20ed64ed 100644 --- a/src/ppp/meson.build +++ b/src/ppp/meson.build @@ -31,7 +31,6 @@ core_plugins += shared_module( name, sources: 'nm-ppp-manager.c', dependencies: deps, - c_args: '-DPPPD_PLUGIN_DIR="@0@"'.format(pppd_plugin_dir), link_args: [ '-Wl,--version-script,@0@'.format(linker_script), ], diff --git a/src/ppp/nm-ppp-manager.c b/src/ppp/nm-ppp-manager.c index 40bdea64..b231ff20 100644 --- a/src/ppp/nm-ppp-manager.c +++ b/src/ppp/nm-ppp-manager.c @@ -438,10 +438,11 @@ impl_ppp_manager_set_ifindex (NMDBusObject *obj, g_variant_get (parameters, "(i)", &ifindex); - _LOGD ("set-ifindex %d", (int) ifindex); - if (priv->ifindex >= 0) { - _LOGW ("can't change the ifindex from %d to %d", priv->ifindex, (int) ifindex); + if (priv->ifindex == ifindex) + _LOGD ("set-ifindex: ignore repeated calls setting ifindex to %d", (int) ifindex); + else + _LOGW ("set-ifindex: can't change the ifindex from %d to %d", priv->ifindex, (int) ifindex); goto out; } @@ -454,14 +455,15 @@ impl_ppp_manager_set_ifindex (NMDBusObject *obj, } if (!plink) { - _LOGW ("unknown interface with ifindex %d", ifindex); + _LOGW ("set-ifindex: unknown interface with ifindex %d", ifindex); ifindex = 0; + } else { + obj_keep_alive = nmp_object_ref (NMP_OBJECT_UP_CAST (plink)); + _LOGD ("set-ifindex: %d, name \"%s\"", (int) ifindex, plink->name); } priv->ifindex = ifindex; - obj_keep_alive = nmp_object_ref (NMP_OBJECT_UP_CAST (plink)); - g_signal_emit (self, signals[IFINDEX_SET], 0, @@ -701,7 +703,7 @@ nm_cmd_line_to_str (NMCmdLine *cmd) char *str; g_ptr_array_add (cmd->array, NULL); - str = g_strjoinv (" ", (gchar **) cmd->array->pdata); + str = g_strjoinv (" ", (char **) cmd->array->pdata); g_ptr_array_remove_index (cmd->array, cmd->array->len - 1); return str; @@ -880,13 +882,13 @@ create_pppd_cmd_line (NMPPPManager *self, nm_cmd_line_add_string (cmd, pppoe_service); } } else if (adsl) { - const gchar *protocol = nm_setting_adsl_get_protocol (adsl); + const char *protocol = nm_setting_adsl_get_protocol (adsl); if (!strcmp (protocol, NM_SETTING_ADSL_PROTOCOL_PPPOA)) { guint32 vpi = nm_setting_adsl_get_vpi (adsl); guint32 vci = nm_setting_adsl_get_vci (adsl); const char *encaps = nm_setting_adsl_get_encapsulation (adsl); - gchar *vpivci; + char *vpivci; nm_cmd_line_add_string (cmd, "plugin"); nm_cmd_line_add_string (cmd, "pppoatm.so"); diff --git a/src/ppp/nm-pppd-plugin.c b/src/ppp/nm-pppd-plugin.c index 989f7433..09196340 100644 --- a/src/ppp/nm-pppd-plugin.c +++ b/src/ppp/nm-pppd-plugin.c @@ -147,7 +147,7 @@ nm_phasechange (void *data, int arg) if ( if_indextoname (index, new_name) && !nm_streq0 (ifname, new_name)) { g_message ("nm-ppp-plugin: interface name changed from '%s' to '%s'", ifname, new_name); - strncpy (ifname, new_name, IF_NAMESIZE); + g_strlcpy (ifname, new_name, IF_NAMESIZE); } } } |