tigervnc/U_tigervnc-fix-reversed-logic-in-vncIsTCPPortUsed.patch
Michal Srb a64783e77b Accepting request 330790 from home:michalsrb:branches:X11:XOrg
- U_tigervnc-fix-reversed-logic-in-vncIsTCPPortUsed.patch
  * Fixes Xvnc with -inetd parameter. (bnc#945600)

OBS-URL: https://build.opensuse.org/request/show/330790
OBS-URL: https://build.opensuse.org/package/show/X11:XOrg/tigervnc?expand=0&rev=70
2015-09-13 16:14:36 +00:00

24 lines
745 B
Diff

Subject: [PATCH] Fix reversed logic in vncIsTCPPortUsed()
Author: Pierre Ossman <ossman@cendio.se>
Patch-mainline: Upstream
Git-commit: 6bb08082956334711de44dad49b95f90a7b02700
Signed-off-by: Michal Srb <msrb@suse.com>
Patch by Jay Kulpinski. Prevents -inetd mode from automatically
finding a free X11 display number.
diff --git a/unix/xserver/hw/vnc/RFBGlue.cc b/unix/xserver/hw/vnc/RFBGlue.cc
index 09832ab..a150792 100644
--- a/unix/xserver/hw/vnc/RFBGlue.cc
+++ b/unix/xserver/hw/vnc/RFBGlue.cc
@@ -194,7 +194,7 @@ int vncIsTCPPortUsed(int port)
std::list<network::TcpListener> dummy;
network::createTcpListeners (&dummy, 0, port);
} catch (rdr::Exception& e) {
- return 0;
+ return 1;
}
- return 1;
+ return 0;
}