aboutsummaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
authorVivek Jain <jvivek@novell.com>2005-02-17 17:52:01 +0800
committerJain Vivek <jvivek@src.gnome.org>2005-02-17 17:52:01 +0800
commit2d688af648224bc86faa2ba368647a1407d1aa02 (patch)
treed8a64d70219ed65391abcbd6df2f589ebfffd10d /plugins
parentd32920c6ff4109f2da1ec359f93efe4bccbae4a9 (diff)
downloadgsoc2013-evolution-2d688af648224bc86faa2ba368647a1407d1aa02.tar.gz
gsoc2013-evolution-2d688af648224bc86faa2ba368647a1407d1aa02.tar.zst
gsoc2013-evolution-2d688af648224bc86faa2ba368647a1407d1aa02.zip
use ssl when "always" and "whenever possible" is enabled changed
2005-02-17 Vivek Jain <jvivek@novell.com> * share-folder-common.c : (get_cnc): use ssl when "always" and "whenever possible" is enabled changed "soap_ssl" to "use_ssl" use the default port "7191" instead of "7181" svn path=/trunk/; revision=28806
Diffstat (limited to 'plugins')
-rw-r--r--plugins/shared-folder/ChangeLog8
-rw-r--r--plugins/shared-folder/share-folder-common.c18
2 files changed, 21 insertions, 5 deletions
diff --git a/plugins/shared-folder/ChangeLog b/plugins/shared-folder/ChangeLog
index 9a1eddfdab..833f871ba2 100644
--- a/plugins/shared-folder/ChangeLog
+++ b/plugins/shared-folder/ChangeLog
@@ -1,3 +1,11 @@
+2005-02-17 Vivek Jain <jvivek@novell.com>
+
+ * share-folder-common.c : (get_cnc):
+
+ use ssl when "always" and "whenever possible" is enabled
+ changed "soap_ssl" to "use_ssl"
+ use the default port "7191" instead of "7181"
+
2005-01-24 Vivek Jain <jvivek@novell.com>
*properties.glade : changed the layout of the widgets
*share-folder.[ch]: removed the checkbuttons for display of rights
diff --git a/plugins/shared-folder/share-folder-common.c b/plugins/shared-folder/share-folder-common.c
index 3a107ac2b3..45996caae6 100644
--- a/plugins/shared-folder/share-folder-common.c
+++ b/plugins/shared-folder/share-folder-common.c
@@ -410,7 +410,8 @@ EGwConnection *
get_cnc (CamelStore *store)
{
EGwConnection *cnc;
- const char *uri, *property_value, *use_ssl, *server_name, *user, *port;
+ const char *uri, *property_value, *server_name, *user, *port;
+ char *use_ssl;
CamelService *service;
CamelURL *url;
@@ -422,20 +423,27 @@ get_cnc (CamelStore *store)
server_name = g_strdup (url->host);
user = g_strdup (url->user);
property_value = camel_url_get_param (url, "soap_port");
- use_ssl = g_strdup (camel_url_get_param (url, "soap_ssl"));
+ use_ssl = g_strdup (camel_url_get_param (url, "use_ssl"));
if(property_value == NULL)
- port = g_strdup ("7181");
+ port = g_strdup ("7191");
else if (strlen(property_value) == 0)
- port = g_strdup ("7181");
+ port = g_strdup ("7191");
else
port = g_strdup (property_value);
- if (use_ssl)
+ if (use_ssl && !g_str_equal (use_ssl, "never"))
uri = g_strconcat ("https://", server_name, ":", port, "/soap", NULL);
else
uri = g_strconcat ("http://", server_name, ":", port, "/soap", NULL);
cnc = e_gw_connection_new (uri, user, service->url->passwd);
+ if (!E_IS_GW_CONNECTION(cnc) && use_ssl && g_str_equal (use_ssl, "when-possible")) {
+ char *http_uri = g_strconcat ("http://", uri + 8, NULL);
+ cnc = e_gw_connection_new (http_uri, user, service->url->passwd);
+ g_free (http_uri);
+ }
+ g_free (use_ssl);
+ use_ssl = NULL;
return cnc;