rpms/libxcb/F-10 libxcb-1.4-keepalive.patch, NONE, 1.1 libxcb.spec, 1.15, 1.16

Adam Jackson ajax at fedoraproject.org
Wed Dec 2 19:40:16 UTC 2009


Author: ajax

Update of /cvs/pkgs/rpms/libxcb/F-10
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv2378

Modified Files:
	libxcb.spec 
Added Files:
	libxcb-1.4-keepalive.patch 
Log Message:
* Wed Dec 02 2009 Adam Jackson <ajax at redhat.com> 1.1.91-8
- libxcb-1.4-keepalive.patch: setsockopt(SO_KEEPALIVE) on TCP. (#476415)


libxcb-1.4-keepalive.patch:
 xcb_util.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- NEW FILE libxcb-1.4-keepalive.patch ---
>From 1cf2a87def76f4646fe05e282b45605d572f2513 Mon Sep 17 00:00:00 2001
From: Adam Jackson <ajax at redhat.com>
Date: Wed, 2 Dec 2009 14:31:56 -0500
Subject: [PATCH] setsockopt(SO_KEEPALIVE) on TCP display connections.

This matches xtrans behaviour in SocketINETConnect, and makes it so apps
don't hang forever if their display dies.

Signed-off-by: Adam Jackson <ajax at redhat.com>
---
 src/xcb_util.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/src/xcb_util.c b/src/xcb_util.c
index 55aadb7..c3cbfa6 100644
--- a/src/xcb_util.c
+++ b/src/xcb_util.c
@@ -260,6 +260,7 @@ static int _xcb_open_tcp(char *host, char *protocol, const unsigned short port)
         if(fd >= 0) {
             int on = 1;
             setsockopt(fd, IPPROTO_TCP, TCP_NODELAY, &on, sizeof(on));
+	    setsockopt(fd, SOL_SOCKET, SO_KEEPALIVE, &on, sizeof(on));
 
             if (connect(fd, addr->ai_addr, addr->ai_addrlen) >= 0)
                 break;
-- 
1.6.5.2



Index: libxcb.spec
===================================================================
RCS file: /cvs/pkgs/rpms/libxcb/F-10/libxcb.spec,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -p -r1.15 -r1.16
--- libxcb.spec	24 Jun 2009 16:51:36 -0000	1.15
+++ libxcb.spec	2 Dec 2009 19:40:16 -0000	1.16
@@ -1,6 +1,6 @@
 Name:           libxcb
 Version:        1.1.91
-Release:        7%{?dist}
+Release:        8%{?dist}
 Summary:        A C binding to the X11 protocol
 
 Group:          System Environment/Libraries
@@ -19,6 +19,7 @@ Patch2:		libxcb-1.1-sloppy-lock.patch
 Patch3:		libxcb-1.1.91-git.patch
 Patch4:         libxcb-1.1.91-xidgen.patch
 Patch5:         libxcb-1.2-disable-nagle.patch
+Patch6:		libxcb-1.4-keepalive.patch
 
 BuildRequires:  autoconf automake libtool pkgconfig
 BuildRequires:  doxygen
@@ -59,6 +60,7 @@ The %{name}-doc package contains documen
 %patch3 -p1 -b .git
 %patch4 -p1 -b .xidgen
 %patch5 -p1 -b .disable-nagle
+%patch6 -p1 -b .keepalive
 
 %build
 autoreconf -v --install
@@ -94,6 +96,9 @@ rm -rf $RPM_BUILD_ROOT
 %{_datadir}/doc/%{name}-%{version}
 
 %changelog
+* Wed Dec 02 2009 Adam Jackson <ajax at redhat.com> 1.1.91-8
+- libxcb-1.4-keepalive.patch: setsockopt(SO_KEEPALIVE) on TCP. (#476415)
+
 * Wed Jun 24 2009 Warren Togami <wtogami at redhat.com> 1.1.91-7
 - disable Nagle's algorithm for X TCP traffic as upstream decided this was a bad idea.
   This should be a significant performance boost.




More information about the fedora-extras-commits mailing list