[evolution-data-server] e_soup_ssl_trust_network_event_cb: Requires a GTlsConnection connection



commit fa745329f820b33566fe81451e3262bb4863b093
Author: Milan Crha <mcrha redhat com>
Date:   Tue Apr 22 12:42:37 2014 +0200

    e_soup_ssl_trust_network_event_cb: Requires a GTlsConnection connection
    
    The connection can be other than the GTlsConnection, like a GTcpConnection,
    thus count with it and connect to "accept-certificate" signal only if
    the given connection is the GTlsConnection descendant.

 libebackend/e-soup-ssl-trust.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/libebackend/e-soup-ssl-trust.c b/libebackend/e-soup-ssl-trust.c
index c96fe8e..d0f10a6 100644
--- a/libebackend/e-soup-ssl-trust.c
+++ b/libebackend/e-soup-ssl-trust.c
@@ -106,7 +106,9 @@ e_soup_ssl_trust_network_event_cb (SoupMessage *msg,
 {
        ESoupSslTrustData *handler = user_data;
 
-       if (event == G_SOCKET_CLIENT_TLS_HANDSHAKING) {
+       /* It's either a GTlsConnection or a GTcpConnection */
+       if (event == G_SOCKET_CLIENT_TLS_HANDSHAKING &&
+           G_IS_TLS_CONNECTION (connection)) {
                g_signal_connect_closure (
                        G_TLS_CONNECTION (connection), "accept-certificate",
                        handler->accept_certificate_closure, FALSE);


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