[X2Go-Commits] [x2goclient] 120/179: pulsemanager.cpp: fix compile errors in find_port () by renaming the ret or port variable to search_port.
git-admin at x2go.org
git-admin at x2go.org
Mon Jun 20 23:55:45 CEST 2016
This is an automated email from the git hooks/post-receive script.
x2go pushed a commit to branch bugfix/osx
in repository x2goclient.
commit 1585f820dee080efb592970f4f923af0e2f039e0
Author: Mihai Moldovan <ionic at 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 80aa83e..02f938c 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -228,6 +228,8 @@ x2goclient (4.0.5.2-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.
* debian/control:
- Maintainer change in package: X2Go Developers <x2go-dev at lists.x2go.org>.
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
More information about the x2go-commits
mailing list