Namespace cleanup: s/parse_url/openconnect_parse_url/
authorDavid Woodhouse <David.Woodhouse@intel.com>
Wed, 8 Sep 2010 21:26:17 +0000 (22:26 +0100)
committerDavid Woodhouse <David.Woodhouse@intel.com>
Tue, 16 Nov 2010 14:00:35 +0000 (14:00 +0000)
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
http.c
main.c
nm-auth-dialog.c
openconnect.h
ssl.c

diff --git a/http.c b/http.c
index 38fec1b..a2985cf 100644 (file)
--- a/http.c
+++ b/http.c
@@ -518,7 +518,7 @@ char *local_strcasestr(const char *haystack, const char *needle)
 #define strcasestr local_strcasestr
 #endif
 
-int parse_url(char *url, char **res_proto, char **res_host, int *res_port,
+int openconnect_parse_url(char *url, char **res_proto, char **res_host, int *res_port,
              char **res_path, int default_port)
 {
        char *proto = url;
@@ -662,7 +662,7 @@ int openconnect_obtain_cookie(struct openconnect_info *vpninfo)
                        free(vpninfo->urlpath);
                        vpninfo->urlpath = NULL;
 
-                       ret = parse_url(vpninfo->redirect_url, NULL, &host, &port, &vpninfo->urlpath, 0);
+                       ret = openconnect_parse_url(vpninfo->redirect_url, NULL, &host, &port, &vpninfo->urlpath, 0);
                        if (ret) {
                                vpninfo->progress(vpninfo, PRG_ERR, "Failed to parse redirected URL '%s': %s\n",
                                                  vpninfo->redirect_url, strerror(-ret));
@@ -1082,7 +1082,7 @@ int openconnect_set_http_proxy(struct openconnect_info *vpninfo, char *proxy)
        free(vpninfo->proxy);
        vpninfo->proxy = NULL;
 
-       ret = parse_url(url, &vpninfo->proxy_type, &vpninfo->proxy,
+       ret = openconnect_parse_url(url, &vpninfo->proxy_type, &vpninfo->proxy,
                        &vpninfo->proxy_port, NULL, 80);
        if (ret)
                goto out;
diff --git a/main.c b/main.c
index acdbc8b..c48ac7e 100644 (file)
--- a/main.c
+++ b/main.c
@@ -478,7 +478,7 @@ int main(int argc, char **argv)
                char *scheme;
                char *group;
 
-               if (parse_url(url, &scheme, &vpninfo->hostname, &vpninfo->port,
+               if (openconnect_parse_url(url, &scheme, &vpninfo->hostname, &vpninfo->port,
                              &group, 443)) {
                        fprintf(stderr, "Failed to parse server URL '%s'\n",
                                url);
index 538f88a..00917ce 100644 (file)
@@ -1189,7 +1189,7 @@ static void connect_host(auth_ui_data *ui_data)
        for (i = 0; i < host_nr; i++)
                host = host->next;
 
-       if (parse_url(host->hostaddress, NULL,
+       if (openconnect_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",
index d2337d1..002968b 100644 (file)
@@ -338,7 +338,7 @@ int parse_xml_response(struct openconnect_info *vpninfo, char *response,
 int openconnect_obtain_cookie(struct openconnect_info *vpninfo);
 char *openconnect_create_useragent(char *base);
 int process_proxy(struct openconnect_info *vpninfo, int ssl_sock);
-int parse_url(char *url, char **res_proto, char **res_host, int *res_port,
+int openconnect_parse_url(char *url, char **res_proto, char **res_host, int *res_port,
              char **res_path, int default_port);
 int openconnect_set_http_proxy(struct openconnect_info *vpninfo, char *proxy);
 
diff --git a/ssl.c b/ssl.c
index 04a9644..0a59a5d 100644 (file)
--- a/ssl.c
+++ b/ssl.c
@@ -621,7 +621,7 @@ int match_cert_hostname(struct openconnect_info *vpninfo, X509 *peer_cert)
                        if (strlen(str) != len)
                                continue;
 
-                       if (parse_url(str, &url_proto, &url_host, &url_port, &url_path, 0)) {
+                       if (openconnect_parse_url(str, &url_proto, &url_host, &url_port, &url_path, 0)) {
                                OPENSSL_free(str);
                                continue;
                        }
@@ -919,7 +919,7 @@ int openconnect_open_https(struct openconnect_info *vpninfo)
                                    (!strncmp(proxies[i], "http://", 7) ||
                                     !strncmp(proxies[i], "socks://", 8) ||
                                     !strncmp(proxies[i], "socks5://", 9)))
-                                       parse_url(proxies[i], &vpninfo->proxy_type,
+                                       openconnect_parse_url(proxies[i], &vpninfo->proxy_type,
                                                  &vpninfo->proxy, &vpninfo->proxy_port,
                                                  NULL, 0);
                                i++;