From 04130d98afe590be8aee360beb1bf6150b29ad28 Mon Sep 17 00:00:00 2001 From: Dan Williams Date: Fri, 2 Feb 2007 21:15:53 +0000 Subject: [PATCH] 2007-02-02 Dan Williams * src/nm-ppp-starter.c - (nm_ppp_dbus_process_helper_ip4_config): use uint32 arrays instead of appending multiple entries with the same key git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2267 4912f4e0-d625-0410-9fb7-b9a5a253dbdc --- vpn-daemons/pptp/ChangeLog | 6 ++++++ vpn-daemons/pptp/src/nm-ppp-starter.c | 26 +++++++------------------- 2 files changed, 13 insertions(+), 19 deletions(-) diff --git a/vpn-daemons/pptp/ChangeLog b/vpn-daemons/pptp/ChangeLog index aebfa11cf1..73e46c4c67 100644 --- a/vpn-daemons/pptp/ChangeLog +++ b/vpn-daemons/pptp/ChangeLog @@ -1,3 +1,9 @@ +2007-02-02 Dan Williams + + * src/nm-ppp-starter.c + - (nm_ppp_dbus_process_helper_ip4_config): use uint32 arrays instead + of appending multiple entries with the same key + 2006-12-03 Dan Williams Patch from Nathaniel McCallum diff --git a/vpn-daemons/pptp/src/nm-ppp-starter.c b/vpn-daemons/pptp/src/nm-ppp-starter.c index 331d2470a0..0bac97e33a 100644 --- a/vpn-daemons/pptp/src/nm-ppp-starter.c +++ b/vpn-daemons/pptp/src/nm-ppp-starter.c @@ -1540,18 +1540,14 @@ static void nm_ppp_dbus_process_helper_ip4_config (DBusConnection *con, DBusMess goto out; } - for (i=0; i < ip4_dns_len; i++) { - if (!nmu_dbus_dict_append_uint32 (&iter_dict, "dns_server", ip4_dns[i])) { - nm_warning ("couldn't append dns_server (number %d) to dict",i); - goto out; - } + if (!nmu_dbus_dict_append_uint32_array (&iter_dict, "dns_server", ip4_dns, ip4_dns_len)) { + nm_warning ("couldn't append dns_servers to dict"); + goto out; } - for (i=0; i < ip4_nbns_len; i++) { - if (!nmu_dbus_dict_append_uint32 (&iter_dict, "nbns_server", ip4_dns[i])) { - nm_warning ("couldn't append nbns_server (number %d) to dict",i); - goto out; - } + if (!nmu_dbus_dict_append_uint32_array (&iter_dict, "nbns_server", ip4_nbns, ip4_nbns_len)) { + nm_warning ("couldn't append nbns_servers to dict"); + goto out; } if (!nmu_dbus_dict_append_uint32 (&iter_dict, "mtu", mtu)) { @@ -1563,16 +1559,8 @@ static void nm_ppp_dbus_process_helper_ip4_config (DBusConnection *con, DBusMess nm_warning ("dict close write failed!"); goto out; } - - -/* Don't bother setting anything that isn't needed! - - if (!nmu_dbus_dict_append_uint32 (&iter_dict, "mss", mss)) { - nm_warning ("couldn't append mss to dict"); - goto out; - } -*/ #endif + if (!dbus_connection_send (data->con, signal, NULL)) { nm_warning ("Could not raise the "NM_DBUS_VPN_SIGNAL_IP4_CONFIG" signal!");