[prev in list] [next in list] [prev in thread] [next in thread]
List: openconnect-devel
Subject: [PATCH] accept full urls in nm-auth-dialog
From: jku () linux ! intel ! com (Jussi Kukkonen)
Date: 2010-02-23 9:26:58
Message-ID: mailman.223.1266931019.2170.openconnect-devel () lists ! infradead ! org
[Download RAW message or body]
E.g. "<host>:<port>" will now work.
Signed-off-by: Jussi Kukkonen <jku at linux.intel.com>
---
nm-auth-dialog.c | 11 +++++++++--
1 files changed, 9 insertions(+), 2 deletions(-)
diff --git a/nm-auth-dialog.c b/nm-auth-dialog.c
index f173212..ae0fc22 100644
--- a/nm-auth-dialog.c
+++ b/nm-auth-dialog.c
@@ -1193,8 +1193,15 @@ static void connect_host(auth_ui_data *ui_data)
for (i = 0; i < host_nr; i++)
host = host->next;
- ui_data->vpninfo->hostname = g_strdup(host->hostaddress);
- if (host->usergroup)
+ if (parse_url(host->hostaddress, NULL,
+ &ui_data->vpninfo->hostname, &ui_data->vpninfo->port,
+ &ui_data->vpninfo->urlpath, 443)) {
+ fprintf(stderr, "Failed to parse server URL '%s'\n",
+ host->hostaddress);
+ ui_data->vpninfo->hostname = g_strdup(host->hostaddress);
+ }
+
+ if (!ui_data->vpninfo->urlpath && host->usergroup)
ui_data->vpninfo->urlpath = g_strdup(host->usergroup);
remember_gconf_key(ui_data, g_strdup("lasthost"), g_strdup(host->hostname));
--
1.6.6.1
--------------030006070807000002070806--
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic