[evolution-patches] 68531, soup patch for rcd
- From: Dan Winship <danw novell com>
- To: evolution-patches ximian com, James Willcox <james ximian com>
- Subject: [evolution-patches] 68531, soup patch for rcd
- Date: Wed, 20 Oct 2004 11:27:45 -0400
This fixes two bugs with proxy authentication failure. It shouldn't have
any effect at all on connector/groupwise.
Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/libsoup/ChangeLog,v
retrieving revision 1.444.2.3
diff -u -r1.444.2.3 ChangeLog
--- ChangeLog 6 Oct 2004 17:30:50 -0000 1.444.2.3
+++ ChangeLog 20 Oct 2004 15:04:19 -0000
@@ -1,3 +1,17 @@
+2004-10-20 Dan Winship <danw novell com>
+
+ * libsoup/soup-connection.c (SoupConnectionPrivate): add a flag
+ indicating whether or not the connection is connected.
+ (tunnel_connect_finished): If successful, set connected. If the
+ server returns a 3xx response, translate it to 407 (under the
+ assumption that it's trying to redirect us to an HTML login page,
+ as in bug 68531).
+ (socket_connect_result, soup_connection_connect_sync): If
+ successful, set connected
+ (soup_connection_disconnect): Don't emit "disconnected" if we
+ aren't yet connected, or the message that was waiting for this
+ connection may get stranded in the queue. (also part of 68531)
+
2004-10-06 Dan Winship <danw novell com>
* configure.in: Bump version to 2.2.1
Index: libsoup/soup-connection.c
===================================================================
RCS file: /cvs/gnome/libsoup/libsoup/soup-connection.c,v
retrieving revision 1.27
diff -u -r1.27 soup-connection.c
--- libsoup/soup-connection.c 26 Aug 2004 15:33:33 -0000 1.27
+++ libsoup/soup-connection.c 20 Oct 2004 15:04:19 -0000
@@ -47,7 +47,7 @@
SoupMessage *cur_req;
time_t last_used;
- gboolean in_use;
+ gboolean connected, in_use;
};
#define PARENT_TYPE G_TYPE_OBJECT
@@ -355,8 +355,13 @@
clear_current_request (conn);
if (SOUP_STATUS_IS_SUCCESSFUL (status)) {
- if (!soup_socket_start_ssl (conn->priv->socket))
+ if (soup_socket_start_ssl (conn->priv->socket))
+ conn->priv->connected = TRUE;
+ else
status = SOUP_STATUS_SSL_FAILED;
+ } else if (SOUP_STATUS_IS_REDIRECTION (status)) {
+ /* Oops, the proxy thinks we're a web browser. */
+ status = SOUP_STATUS_PROXY_AUTHENTICATION_REQUIRED;
}
g_signal_emit (conn, signals[CONNECT_RESULT], 0,
@@ -428,6 +433,8 @@
return;
}
+ conn->priv->connected = TRUE;
+
done:
g_signal_emit (conn, signals[CONNECT_RESULT], 0,
proxified_status (conn, status));
@@ -522,7 +529,9 @@
g_object_unref (connect_msg);
}
- if (!SOUP_STATUS_IS_SUCCESSFUL (status)) {
+ if (SOUP_STATUS_IS_SUCCESSFUL (status))
+ conn->priv->connected = TRUE;
+ else {
fail:
if (conn->priv->socket) {
g_object_unref (conn->priv->socket);
@@ -556,6 +565,12 @@
soup_socket_disconnect (conn->priv->socket);
g_object_unref (conn->priv->socket);
conn->priv->socket = NULL;
+
+ /* Don't emit "disconnected" if we aren't yet connected */
+ if (!conn->priv->connected)
+ return;
+
+ conn->priv->connected = FALSE;
g_signal_emit (conn, signals[DISCONNECTED], 0);
if (!conn->priv->cur_req ||
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]