diff --git a/0001-daemon-properly-check-for-clients.patch b/0001-daemon-properly-check-for-clients.patch new file mode 100644 index 0000000..1fef5db --- /dev/null +++ b/0001-daemon-properly-check-for-clients.patch @@ -0,0 +1,45 @@ +From 2608c9a951caed5ebec7ad36571c5adb6671b855 Mon Sep 17 00:00:00 2001 +From: Martin Kletzander +Date: Tue, 1 Mar 2016 15:42:32 +0100 +Subject: [PATCH] daemon: properly check for clients + +Signed-off-by: Martin Kletzander +(cherry picked from commit 78b0ccc71e99f769068974ff56638c99b1c3b4de) +--- + src/rpc/virnetdaemon.c | 14 +++++++++++--- + 1 file changed, 11 insertions(+), 3 deletions(-) + +diff --git a/src/rpc/virnetdaemon.c b/src/rpc/virnetdaemon.c +index 298fbf4..b05ba99 100644 +--- a/src/rpc/virnetdaemon.c ++++ b/src/rpc/virnetdaemon.c +@@ -843,15 +843,23 @@ virNetDaemonClose(virNetDaemonPtr dmn) + static int + daemonServerHasClients(void *payload, + const void *key ATTRIBUTE_UNUSED, +- void *opaque ATTRIBUTE_UNUSED) ++ void *opaque) + { ++ bool *clients = opaque; + virNetServerPtr srv = payload; + +- return virNetServerHasClients(srv); ++ if (virNetServerHasClients(srv)) ++ *clients = true; ++ ++ return 0; + } + + bool + virNetDaemonHasClients(virNetDaemonPtr dmn) + { +- return virHashForEach(dmn->servers, daemonServerHasClients, NULL) > 0; ++ bool ret = false; ++ ++ virHashForEach(dmn->servers, daemonServerHasClients, &ret); ++ ++ return ret; + } +-- +2.7.2 + diff --git a/libvirt.spec b/libvirt.spec index d3da4ab..032ffd6 100644 --- a/libvirt.spec +++ b/libvirt.spec @@ -378,7 +378,7 @@ Summary: Library providing a simple virtualization API Name: libvirt Version: 1.3.2 -Release: 1%{?dist}%{?extra_release} +Release: 2%{?dist}%{?extra_release} License: LGPLv2+ Group: Development/Libraries BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root @@ -389,6 +389,12 @@ URL: http://libvirt.org/ %endif Source: http://libvirt.org/sources/%{?mainturl}libvirt-%{version}.tar.gz +# NON-UPSTREAM patch which fixes regression where libvirt +# drops connections after > 30 seconds. +# https://bugzilla.redhat.com/1315606 +# https://github.com/nertpinx/libvirt/commit/78b0ccc71e99f769068974ff56638c99b1c3b4de +Patch0001: 0001-daemon-properly-check-for-clients.patch + %if %{with_libvirtd} Requires: libvirt-daemon = %{version}-%{release} %if %{with_network} @@ -2377,6 +2383,9 @@ exit 0 %doc examples/systemtap %changelog +* Wed Mar 9 2016 Richard W.M. Jones - 1.3.2-2 +- Add fix for RHBZ#1315606. + * Tue Mar 1 2016 Daniel Berrange - 1.3.2-1 - Update to 1.3.2 release