[NM-openconnect PATCH] Allow 'lasthost' and 'autoconnect' settings.
- From: David Woodhouse <dwmw2 infradead org>
- To: Dan Williams <dcbw redhat com>
- Cc: networkmanager-list gnome org
- Subject: [NM-openconnect PATCH] Allow 'lasthost' and 'autoconnect' settings.
- Date: Wed, 25 Mar 2009 15:02:40 +0000
I updated the auth-dialog¹ to remember the last VPN server used, and
also added a setting to make it automatically start connecting rather
than waiting for the user to choose a host (on the basis that the user
will probably choose the same host every time, and doesn't want to
wait).
I tried using a boolean in gconf for the latter, but NetworkManager
doesn't seem to work with that, and the key ends up getting deleted
every time I connect. So I reverted to a string containing 'yes' or
'no', which seems to be what's done elsewhere. Should we just fix the
configuration handling to cope with real GConf booleans instead?
diff --git a/src/nm-openconnect-service.c b/src/nm-openconnect-service.c
index 8c7fd3a..68fcd15 100644
--- a/src/nm-openconnect-service.c
+++ b/src/nm-openconnect-service.c
@@ -54,6 +54,8 @@ static ValidProperty valid_properties[] = {
{ NM_OPENCONNECT_KEY_XMLCONFIG, G_TYPE_STRING, 0, 0 },
{ NM_OPENCONNECT_KEY_PRIVKEY, G_TYPE_STRING, 0, 0 },
{ NM_OPENCONNECT_KEY_CERTSIGS, G_TYPE_STRING, 0, 0 },
+ { NM_OPENCONNECT_KEY_LASTHOST, G_TYPE_STRING, 0, 0 },
+ { NM_OPENCONNECT_KEY_AUTOCONNECT, G_TYPE_BOOLEAN, 0, 0 },
{ NULL, G_TYPE_NONE, 0, 0 }
};
diff --git a/src/nm-openconnect-service.h b/src/nm-openconnect-service.h
index 92db840..71b74ba 100644
--- a/src/nm-openconnect-service.h
+++ b/src/nm-openconnect-service.h
@@ -27,6 +27,8 @@
#define NM_OPENCONNECT_KEY_USERNAME "username"
#define NM_OPENCONNECT_KEY_XMLCONFIG "xmlconfig"
#define NM_OPENCONNECT_KEY_CERTSIGS "certsigs"
+#define NM_OPENCONNECT_KEY_LASTHOST "lasthost"
+#define NM_OPENCONNECT_KEY_AUTOCONNECT "autoconnect"
#define NM_OPENCONNECT_AUTHTYPE_CERT "cert"
#define NM_OPENCONNECT_AUTHTYPE_CERT_TPM "cert-tpm"
--
1.6.0.6
--
David Woodhouse Open Source Technology Centre
David Woodhouse intel com Intel Corporation
¹ http://git.infradead.org/users/dwmw2/openconnect.git
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]