Re: [PATCH] vpn: Add a new field so VPN plugins can specify multiple domains
- From: Dan Williams <dcbw redhat com>
- To: Evan Broder <evan ebroder net>
- Cc: networkmanager-list gnome org
- Subject: Re: [PATCH] vpn: Add a new field so VPN plugins can specify multiple domains
- Date: Thu, 15 Mar 2012 17:10:37 -0500
On Thu, 2012-03-15 at 14:56 -0700, Evan Broder wrote:
> ---
> include/NetworkManagerVPN.h | 3 +++
> src/vpn-manager/nm-vpn-connection.c | 9 +++++++++
> 2 files changed, 12 insertions(+), 0 deletions(-)
Applied with a compile fix, thanks!
Dan
> diff --git a/include/NetworkManagerVPN.h b/include/NetworkManagerVPN.h
> index f4ef93d..8ee5b9a 100644
> --- a/include/NetworkManagerVPN.h
> +++ b/include/NetworkManagerVPN.h
> @@ -151,6 +151,9 @@ typedef enum {
> /* string: DNS domain name */
> #define NM_VPN_PLUGIN_IP4_CONFIG_DOMAIN "domain"
>
> +/* array of strings: DNS domain names */
> +#define NM_VPN_PLUGIN_IP4_CONFIG_DOMAINS "domains"
> +
> /* string: Login message */
> #define NM_VPN_PLUGIN_IP4_CONFIG_BANNER "banner"
>
> diff --git a/src/vpn-manager/nm-vpn-connection.c b/src/vpn-manager/nm-vpn-connection.c
> index 212be0b..abcce4f 100644
> --- a/src/vpn-manager/nm-vpn-connection.c
> +++ b/src/vpn-manager/nm-vpn-connection.c
> @@ -547,6 +547,15 @@ nm_vpn_connection_ip4_config_get (DBusGProxy *proxy,
> if (val)
> nm_ip4_config_add_domain (config, g_value_get_string (val));
>
> + val = (GValue *) g_hash_table_lookup (config_hash, NM_VPN_PLUGIN_IP4_CONFIG_DOMAINS);
> + if (val) {
> + GStrv domains = (GStrv *) g_value_get_boxed (val);
> + GStrv domain;
> +
> + for (domain = domains; *domain; domain++)
> + nm_ip4_config_add_domain (config, *domain);
> + }
> +
> val = (GValue *) g_hash_table_lookup (config_hash, NM_VPN_PLUGIN_IP4_CONFIG_BANNER);
> if (val) {
> g_free (priv->banner);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]