[libsoup/f19] Add patch to fix hangs with SoupSessionSync (#976529 et al)
Dan Winship
danw at fedoraproject.org
Fri Jul 12 20:51:24 UTC 2013
commit 1dcea6c34f4524970cbec650cc3feafafa4f0209
Author: Dan Winship <danw at gnome.org>
Date: Fri Jul 12 16:47:03 2013 -0400
Add patch to fix hangs with SoupSessionSync (#976529 et al)
libsoup-remote-disconnected.patch | 32 ++++++++++++++++++++++++++++++++
libsoup.spec | 7 ++++++-
2 files changed, 38 insertions(+), 1 deletions(-)
---
diff --git a/libsoup-remote-disconnected.patch b/libsoup-remote-disconnected.patch
new file mode 100644
index 0000000..f8b6cb6
--- /dev/null
+++ b/libsoup-remote-disconnected.patch
@@ -0,0 +1,32 @@
+From 5adba70cf67a22be0266f3ef6cdcb65926476fe4 Mon Sep 17 00:00:00 2001
+From: Philip Withnall <philip at tecnocode.co.uk>
+Date: Tue, 2 Jul 2013 15:04:18 +0100
+Subject: [PATCH] soup-session: Force cleanup of REMOTE_DISCONNECTED conns for
+ sync sessions
+
+get_connection() assumed that REMOTE_DISCONNECTED connections would get
+implicitly cleaned up elsewhere in the code, which is true for async
+sessions, but not sync ones. This could lead to connection exhaustion and
+hence hangs.
+
+Closes: https://bugzilla.gnome.org/show_bug.cgi?id=703463
+---
+ libsoup/soup-session.c | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/libsoup/soup-session.c b/libsoup/soup-session.c
+index 6a256ab..7ef7654 100644
+--- a/libsoup/soup-session.c
++++ b/libsoup/soup-session.c
+@@ -1721,6 +1721,8 @@ get_connection (SoupMessageQueueItem *item, gboolean *should_cleanup)
+ gboolean my_should_cleanup = FALSE;
+ gboolean need_new_connection;
+
++ soup_session_cleanup_connections (session, FALSE);
++
+ need_new_connection =
+ (soup_message_get_flags (item->msg) & SOUP_MESSAGE_NEW_CONNECTION) ||
+ (!(soup_message_get_flags (item->msg) & SOUP_MESSAGE_IDEMPOTENT) &&
+--
+1.8.3.1
+
diff --git a/libsoup.spec b/libsoup.spec
index 3ba0ac8..c5ff356 100644
--- a/libsoup.spec
+++ b/libsoup.spec
@@ -4,7 +4,7 @@
Name: libsoup
Version: 2.42.2
-Release: 1%{?dist}
+Release: 2%{?dist}
License: LGPLv2
Group: Development/Libraries
Summary: Soup, an HTTP library implementation
@@ -12,6 +12,7 @@ URL: http://live.gnome.org/LibSoup
#VCS: git:git://git.gnome.org/libsoup
Source: http://download.gnome.org/sources/libsoup/2.42/libsoup-%{version}.tar.xz
Requires: glib-networking >= %{glib2_version}
+Patch1: libsoup-remote-disconnected.patch
### Build Dependencies ###
@@ -47,6 +48,7 @@ you to develop applications that use the libsoup library.
%prep
%setup -q
+%patch1 -p1 -b .remote-disconnected
%build
%configure --disable-static
@@ -81,6 +83,9 @@ rm -f $RPM_BUILD_ROOT/%{_libdir}/*.la
%{_datadir}/gtk-doc/html/%{name}-2.4
%changelog
+* Fri Jul 12 2013 Dan Winship <danw at redhat.com> - 2.42.2-2
+- Add patch to fix hangs with SoupSessionSync (#976529 et al)
+
* Mon Apr 29 2013 Kalev Lember <kalevlember at gmail.com> - 2.42.2-1
- Update to 2.42.2
More information about the scm-commits
mailing list