include krfb patches (upstream pull request #16)

epel9
Rex Dieter 11 years ago
parent c8b2768790
commit 2524743962

@ -0,0 +1,36 @@
From afd1d329ed117f6e4d8c46eba362b7d5c51184ac Mon Sep 17 00:00:00 2001
From: Amandeep Singh <aman.dedman@gmail.com>
Date: Wed, 9 Oct 2013 04:12:08 +0530
Subject: [PATCH 1/2] Fix crash in krfb
Krfb crashes on quit, if any client is connected
due to a rfbClientConnectionGone call missing
---
libvncserver/main.c | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
diff --git a/libvncserver/main.c b/libvncserver/main.c
index 4cb18ac..b8cdde1 100644
--- a/libvncserver/main.c
+++ b/libvncserver/main.c
@@ -1061,10 +1061,13 @@ void rfbShutdownServer(rfbScreenInfoPtr screen,rfbBool disconnectClients) {
if(disconnectClients) {
rfbClientPtr cl;
rfbClientIteratorPtr iter = rfbGetClientIterator(screen);
- while( (cl = rfbClientIteratorNext(iter)) )
- if (cl->sock > -1)
- /* we don't care about maxfd here, because the server goes away */
- rfbCloseClient(cl);
+ while( (cl = rfbClientIteratorNext(iter)) ) {
+ if (cl->sock > -1) {
+ /* we don't care about maxfd here, because the server goes away */
+ rfbCloseClient(cl);
+ rfbClientConnectionGone(cl);
+ }
+ }
rfbReleaseClientIterator(iter);
}
--
1.9.3

@ -0,0 +1,30 @@
From 012594b970b07c212eaf48ed22333a9d37d017a4 Mon Sep 17 00:00:00 2001
From: Amandeep Singh <aman.dedman@gmail.com>
Date: Sat, 28 Sep 2013 17:58:13 +0530
Subject: [PATCH 2/2] allow rfbInitSockets with non-ready states.
This allows for reinitializations of e. g. sockets in a SHUTDOWN state.
The only state that doesn't make sense to reinitialize are READY states.
---
libvncserver/sockets.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/libvncserver/sockets.c b/libvncserver/sockets.c
index ddd8450..d2f814b 100644
--- a/libvncserver/sockets.c
+++ b/libvncserver/sockets.c
@@ -122,8 +122,9 @@ rfbInitSockets(rfbScreenInfoPtr rfbScreen)
{
in_addr_t iface = rfbScreen->listenInterface;
- if (rfbScreen->socketState!=RFB_SOCKET_INIT)
- return;
+ if (rfbScreen->socketState == RFB_SOCKET_READY) {
+ return;
+ }
rfbScreen->socketState = RFB_SOCKET_READY;
--
1.9.3

@ -6,7 +6,7 @@
Summary: Library to make writing a vnc server easy
Name: libvncserver
Version: 0.9.10
Release: 0.2.%{snap}git%{git_short}%{?dist}
Release: 0.3.%{snap}git%{git_short}%{?dist}
# NOTE: --with-tightvnc-filetransfer => GPLv2
License: GPLv2+
@ -24,6 +24,9 @@ Patch1: LibVNCServer-0.9.10-system_minilzo.patch
Patch2: libvncserver-0.9.1-multilib.patch
# pkgconfig love (upstreamable)
Patch3: LibVNCServer-0.9.9-pkgconfig.patch
# krfb patches, https://github.com/LibVNC/libvncserver/pull/16
Patch11: 0001-Fix-crash-in-krfb.patch
Patch12: 0002-allow-rfbInitSockets-with-non-ready-states.patch
## upstream patches
@ -79,6 +82,8 @@ Provides: LibVNCServer-devel = %{version}-%{release}
rm -fv common/lzodefs.h common/lzoconf.h commmon/minilzo.h common/minilzo.c
%patch2 -p1 -b .multilib
%patch3 -p1 -b .pkgconfig
%patch11 -p1 -b .0001
%patch12 -p1 -b .0002
# fix encoding
for file in AUTHORS ChangeLog ; do
@ -146,6 +151,9 @@ xvfb-run -a make -C test test ||:
%changelog
* Sun Aug 03 2014 Rex Dieter <rdieter@fedoraproject.org> 0.9.10-0.3.20140405git646f844f
- include krfb patches (upstream pull request #16)
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.9.10-0.2.20140405git646f844f
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild

Loading…
Cancel
Save