From cea2812932615a991b829d5675726cee14469cfa25a6a32fd1810b3f501cd6ad Mon Sep 17 00:00:00 2001 From: Michal Srb Date: Tue, 20 May 2014 14:05:40 +0000 Subject: [PATCH] Accepting request 234861 from home:michalsrb:branches:X11:XOrg - u_tigervnc-ignore-epipe-on-write.patch * Do not display error message because of EPIPE on write. (bnc#864676) OBS-URL: https://build.opensuse.org/request/show/234861 OBS-URL: https://build.opensuse.org/package/show/X11:XOrg/tigervnc?expand=0&rev=28 --- tigervnc.changes | 7 +++++++ tigervnc.spec | 2 ++ u_tigervnc-ignore-epipe-on-write.patch | 25 +++++++++++++++++++++++++ 3 files changed, 34 insertions(+) create mode 100644 u_tigervnc-ignore-epipe-on-write.patch diff --git a/tigervnc.changes b/tigervnc.changes index 42963da..e34676f 100644 --- a/tigervnc.changes +++ b/tigervnc.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Tue May 20 13:55:30 UTC 2014 - msrb@suse.com + +- u_tigervnc-ignore-epipe-on-write.patch + * Do not display error message because of EPIPE on write. + (bnc#864676) + ------------------------------------------------------------------- Fri May 16 13:52:19 UTC 2014 - msrb@suse.com diff --git a/tigervnc.spec b/tigervnc.spec index feb129e..ef03ea4 100644 --- a/tigervnc.spec +++ b/tigervnc.spec @@ -102,6 +102,7 @@ Patch3: tigervnc-clean-pressed-key-on-exit.patch Patch4: tigervnc-sf3492352.diff Patch5: tigervnc-sf3495623.patch Patch6: u_tigervnc-dont-send-ascii-control-characters.patch +Patch7: u_tigervnc-ignore-epipe-on-write.patch # Xserver patches Patch10: tigervnc-1.2.80-fix-int-to-pointer.patch @@ -141,6 +142,7 @@ fi %patch4 -p1 %patch5 -p1 %patch6 -p0 +%patch7 -p0 pushd unix/xserver patch -p1 < ../xserver114.patch diff --git a/u_tigervnc-ignore-epipe-on-write.patch b/u_tigervnc-ignore-epipe-on-write.patch new file mode 100644 index 0000000..29cdd26 --- /dev/null +++ b/u_tigervnc-ignore-epipe-on-write.patch @@ -0,0 +1,25 @@ +Author: Michal Srb +Subject: Ignore EPIPE on write. +Patch-Mainline: To be upstreamed +References: bnc#864676 + +If the VNC server closes connection after our last read and before this write, we will report error message about EPIPE. +This situation is no error, however, we should quit normally same as when we find out that connection was closed during read. +Index: common/rdr/FdOutStream.cxx +=================================================================== +--- common/rdr/FdOutStream.cxx (revision 5178) ++++ common/rdr/FdOutStream.cxx (working copy) +@@ -225,7 +225,12 @@ + // network connections. Should in fact never ever happen... + } while (n < 0 && (errno == EWOULDBLOCK)); + +- if (n < 0) throw SystemException("write",errno); ++ if (n < 0) { ++ if(errno == EPIPE) ++ n = length; // Ignore EPIPE and fake successfull write, it doesn't matter that we are writing to closed socket, we will find out once we try to read from it. ++ else ++ throw SystemException("write", errno); ++ } + + gettimeofday(&lastWrite, NULL); +