[evolution-data-server] Bug 767786 - Don't hardcode socks:// scheme for Camel accounts proxy lookup



commit 1e6051539cd6b0dd023aa1759f911b37a454671d
Author: Milan Crha <mcrha redhat com>
Date:   Wed Aug 17 11:50:01 2016 +0200

    Bug 767786 - Don't hardcode socks:// scheme for Camel accounts proxy lookup

 camel/camel-network-service.c |   10 +++++++---
 1 files changed, 7 insertions(+), 3 deletions(-)
---
diff --git a/camel/camel-network-service.c b/camel/camel-network-service.c
index e2800b9..df0ca64 100644
--- a/camel/camel-network-service.c
+++ b/camel/camel-network-service.c
@@ -674,13 +674,17 @@ network_service_new_connectable (CamelNetworkService *service)
        host = camel_network_settings_dup_host_ensure_ascii (network_settings);
        port = camel_network_settings_get_port (network_settings);
 
-       if (host && *host)
+       if (host && *host) {
+               CamelProvider *provider;
+
+               provider = camel_service_get_provider (CAMEL_SERVICE (service));
+
                connectable = g_object_new (G_TYPE_NETWORK_ADDRESS,
-                       "scheme", "socks",
+                       "scheme", provider ? provider->protocol : "socks",
                        "hostname", host,
                        "port", port,
                        NULL);
-
+       }
 
        g_free (host);
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]