[X2Go-Commits] [nx-libs] 09/19: Loop.cpp: create xServerAddrUNIX only if required
git-admin at x2go.org
git-admin at x2go.org
Sat Dec 30 03:35:16 CET 2017
This is an automated email from the git hooks/post-receive script.
x2go pushed a commit to branch 3.6.x
in repository nx-libs.
commit 6d8fe661eb792ff9527d78073e361bb67c3b0ede
Author: Ulrich Sibiller <uli42 at gmx.de>
Date: Wed Dec 27 14:43:22 2017 +0100
Loop.cpp: create xServerAddrUNIX only if required
---
nxcomp/src/Loop.cpp | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/nxcomp/src/Loop.cpp b/nxcomp/src/Loop.cpp
index c6dc3fe..1bf3a61 100644
--- a/nxcomp/src/Loop.cpp
+++ b/nxcomp/src/Loop.cpp
@@ -3912,10 +3912,7 @@ void SetupDisplaySocket(int &addr_family, sockaddr *&addr,
nxinfo << "Loop: Using real X server on UNIX domain socket.\n"
<< std::flush;
- sockaddr_un *xServerAddrUNIX = new sockaddr_un;
-
addr_family = AF_UNIX;
- xServerAddrUNIX -> sun_family = AF_UNIX;
//
// The scope of this function is to fill either the sockaddr_un
@@ -3962,7 +3959,6 @@ void SetupDisplaySocket(int &addr_family, sockaddr *&addr,
<< "for accessing DISPLAY=:" << xPort << ".\n";
addr = (sockaddr *) xServerAddrABSTRACT;
- delete xServerAddrUNIX;
delete [] display;
return;
@@ -4035,6 +4031,9 @@ void SetupDisplaySocket(int &addr_family, sockaddr *&addr,
nxinfo << "Loop: Assuming X socket name '" << unixSocketName
<< "'.\n" << std::flush;
+ sockaddr_un *xServerAddrUNIX = new sockaddr_un;
+
+ xServerAddrUNIX -> sun_family = AF_UNIX;
strcpy(xServerAddrUNIX -> sun_path, unixSocketName);
addr = (sockaddr *) xServerAddrUNIX;
--
Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/nx-libs.git
More information about the x2go-commits
mailing list