This is an automated email from the git hooks/post-receive script.

x2go pushed a commit to branch bugfix/osx
in repository x2goclient.

commit 0f883d83417bdd8bc7978c792abd3d91238dcc6c
Author: Mihai Moldovan <io...@ionic.de>
Date:   Mon Nov 30 04:48:11 2015 +0100

    pulsemanager.cpp: fix compile errors in find_port () by renaming the ret or 
port variable to search_port.
---
 debian/changelog     |    2 ++
 src/pulsemanager.cpp |   21 +++++++++++----------
 2 files changed, 13 insertions(+), 10 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index 42f1caa..1bad900 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -203,6 +203,8 @@ x2goclient (4.0.5.3-0x2go1) UNRELEASED; urgency=medium
     - pulsemanager.cpp: typo fix in variable name server_working_dir_.
     - pulsemanager.{cpp,h}: find_port () actually returns a value, fix
       declaration accordingly.
+    - pulsemanager.cpp: fix compile errors in find_port () by renaming the ret
+      or port variable to search_port.
 
  -- X2Go Release Manager <git-ad...@x2go.org>  Mon, 19 Sep 2016 09:07:07 +0200
 
diff --git a/src/pulsemanager.cpp b/src/pulsemanager.cpp
index ae8ece9..7b0fa65 100644
--- a/src/pulsemanager.cpp
+++ b/src/pulsemanager.cpp
@@ -145,39 +145,40 @@ void PulseManager::start_win () {
 bool PulseManager::find_port (bool search_esd) {
   QTcpSocket tcpSocket (0);
   bool free = false;
-  std::uint16_t ret = pulse_port_;
+  std::uint16_t search_port = pulse_port_;
   std::uint16_t other_port = esd_port_;
 
   // If the search_esd parameter is true, find a free port
   // for the PulseAudio emulation.
   if (search_esd) {
-    ret = esd_port_;
+    search_port = esd_port_;
     other_port = pulse_port_;
   }
 
   do {
     // Skip this port, if it's reserved for the counterpart.
-    if (ret == other_port) {
-      ++ret;
+    if (search_port == other_port) {
+      ++search_port;
       continue;
     }
 
-    tcpSocket.connectToHost ("127.0.0.1", ret);
+    tcpSocket.connectToHost ("127.0.0.1", search_port);
 
     if (tcpSocket.waitForConnected (1000)) {
       tcpSocket.close ();
       free = false;
-      ++ret;
+      ++search_port;
     }
-    else
+    else {
       free = true;
-  } while ((!free) && (port > 1023));
+    }
+  } while ((!free) && (search_port > 1023));
 
   if (!search_esd) {
-    pulse_port_ = ret;
+    pulse_port_ = search_port;
   }
   else {
-    esd_port_ = ret;
+    esd_port_ = search_port;
   }
 
   return (free);

--
Alioth's /srv/git/code.x2go.org/x2goclient.git//..//_hooks_/post-receive-email 
on /srv/git/code.x2go.org/x2goclient.git
_______________________________________________
x2go-commits mailing list
x2go-commits@lists.x2go.org
http://lists.x2go.org/listinfo/x2go-commits

Reply via email to