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
This commit is contained in:
Michal Srb 2014-05-20 14:05:40 +00:00 committed by Git OBS Bridge
parent 3159c3c55e
commit bac2b6338f
3 changed files with 34 additions and 0 deletions

View File

@ -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 Fri May 16 13:52:19 UTC 2014 - msrb@suse.com

View File

@ -102,6 +102,7 @@ Patch3: tigervnc-clean-pressed-key-on-exit.patch
Patch4: tigervnc-sf3492352.diff Patch4: tigervnc-sf3492352.diff
Patch5: tigervnc-sf3495623.patch Patch5: tigervnc-sf3495623.patch
Patch6: u_tigervnc-dont-send-ascii-control-characters.patch Patch6: u_tigervnc-dont-send-ascii-control-characters.patch
Patch7: u_tigervnc-ignore-epipe-on-write.patch
# Xserver patches # Xserver patches
Patch10: tigervnc-1.2.80-fix-int-to-pointer.patch Patch10: tigervnc-1.2.80-fix-int-to-pointer.patch
@ -141,6 +142,7 @@ fi
%patch4 -p1 %patch4 -p1
%patch5 -p1 %patch5 -p1
%patch6 -p0 %patch6 -p0
%patch7 -p0
pushd unix/xserver pushd unix/xserver
patch -p1 < ../xserver114.patch patch -p1 < ../xserver114.patch

View File

@ -0,0 +1,25 @@
Author: Michal Srb <msrb@suse.com>
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);