[libvncserver] include krfb patches (upstream pull request #16)
Rex Dieter
rdieter at fedoraproject.org
Mon Aug 4 01:30:05 UTC 2014
commit 2524743962d1e2477769bbd0d0ce0719eda8b9a3
Author: Rex Dieter <rdieter at math.unl.edu>
Date: Sun Aug 3 20:30:00 2014 -0500
include krfb patches (upstream pull request #16)
0001-Fix-crash-in-krfb.patch | 36 ++++++++++++++++++++
...llow-rfbInitSockets-with-non-ready-states.patch | 30 ++++++++++++++++
libvncserver.spec | 10 +++++-
3 files changed, 75 insertions(+), 1 deletions(-)
---
diff --git a/0001-Fix-crash-in-krfb.patch b/0001-Fix-crash-in-krfb.patch
new file mode 100644
index 0000000..1847720
--- /dev/null
+++ b/0001-Fix-crash-in-krfb.patch
@@ -0,0 +1,36 @@
+From afd1d329ed117f6e4d8c46eba362b7d5c51184ac Mon Sep 17 00:00:00 2001
+From: Amandeep Singh <aman.dedman at 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
+
diff --git a/0002-allow-rfbInitSockets-with-non-ready-states.patch b/0002-allow-rfbInitSockets-with-non-ready-states.patch
new file mode 100644
index 0000000..a9107e2
--- /dev/null
+++ b/0002-allow-rfbInitSockets-with-non-ready-states.patch
@@ -0,0 +1,30 @@
+From 012594b970b07c212eaf48ed22333a9d37d017a4 Mon Sep 17 00:00:00 2001
+From: Amandeep Singh <aman.dedman at 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
+
diff --git a/libvncserver.spec b/libvncserver.spec
index e16055a..715cc90 100644
--- a/libvncserver.spec
+++ b/libvncserver.spec
@@ -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 at fedoraproject.org> 0.9.10-0.3.20140405git646f844f
+- include krfb patches (upstream pull request #16)
+
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 0.9.10-0.2.20140405git646f844f
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
More information about the scm-commits
mailing list