summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Winship <danw@gnome.org>2014-06-07 16:05:42 (GMT)
committerDan Winship <danw@gnome.org>2014-06-07 16:05:42 (GMT)
commitc7a7e11221a5a1bdf9e7feec4bb22b41b7342444 (patch)
tree9f1b2741515013e3c8ec13d9a01d26297e40b676
parentce92fc44d8ba50d7992b6c7c38f7e340debc30be (diff)
downloadlibsoup-wip/proxy-connect.tar.gz
libsoup-wip/proxy-connect.tar.xz
fixup! soup-session: add soup_session_proxy_connect* functionswip/proxy-connect
-rw-r--r--libsoup/soup-connection.c11
-rw-r--r--libsoup/soup-connection.h1
-rw-r--r--libsoup/soup-session.c5
3 files changed, 13 insertions, 4 deletions
diff --git a/libsoup/soup-connection.c b/libsoup/soup-connection.c
index 48df8e3..fcdc1cf 100644
--- a/libsoup/soup-connection.c
+++ b/libsoup/soup-connection.c
@@ -526,6 +526,17 @@ soup_connection_is_tunnelled (SoupConnection *conn)
}
gboolean
+soup_connection_is_ssl (SoupConnection *conn)
+{
+ SoupConnectionPrivate *priv;
+
+ g_return_val_if_fail (SOUP_IS_CONNECTION (conn), FALSE);
+ priv = SOUP_CONNECTION_GET_PRIVATE (conn);
+
+ return priv->ssl;
+}
+
+gboolean
soup_connection_start_ssl_sync (SoupConnection *conn,
GCancellable *cancellable,
GError **error)
diff --git a/libsoup/soup-connection.h b/libsoup/soup-connection.h
index 8df6112..bc4dcfa 100644
--- a/libsoup/soup-connection.h
+++ b/libsoup/soup-connection.h
@@ -68,6 +68,7 @@ SoupURI *soup_connection_get_remote_uri (SoupConnection *conn);
SoupURI *soup_connection_get_proxy_uri (SoupConnection *conn);
gboolean soup_connection_is_via_proxy (SoupConnection *conn);
gboolean soup_connection_is_tunnelled (SoupConnection *conn);
+gboolean soup_connection_is_ssl (SoupConnection *conn);
SoupConnectionState soup_connection_get_state (SoupConnection *conn);
void soup_connection_set_state (SoupConnection *conn,
diff --git a/libsoup/soup-session.c b/libsoup/soup-session.c
index aa559ac..45b7da6 100644
--- a/libsoup/soup-session.c
+++ b/libsoup/soup-session.c
@@ -1667,7 +1667,6 @@ tunnel_message_completed (SoupMessage *msg, gboolean io_complete, gpointer user_
SoupMessageQueueItem *tunnel_item = user_data;
SoupMessageQueueItem *item = tunnel_item->related;
SoupSession *session = tunnel_item->session;
- gboolean is_ssl;
guint status;
if (tunnel_item->state == SOUP_MESSAGE_RESTARTING) {
@@ -1691,8 +1690,7 @@ tunnel_message_completed (SoupMessage *msg, gboolean io_complete, gpointer user_
return;
}
- g_object_get (G_OBJECT (item->conn), "ssl", &is_ssl, NULL);
- if (!is_ssl) {
+ if (!soup_connection_is_ssl (item->conn)) {
tunnel_complete (tunnel_item, status, NULL);
return;
}
@@ -4758,7 +4756,6 @@ soup_session_proxy_connect_async (SoupSession *session,
SoupSessionPrivate *priv;
SoupMessage *msg;
SoupMessageQueueItem *item;
- gboolean use_thread_context;
char *uri;
g_return_if_fail (SOUP_IS_SESSION (session));