[X2Go-Commits] [x2goclient] 01/01: X2Go Client will send it's OS name to the broker when sending client event.
git-admin at x2go.org
git-admin at x2go.org
Thu May 27 16:43:33 CEST 2021
This is an automated email from the git hooks/post-receive script.
x2go pushed a commit to branch master
in repository x2goclient.
commit fb883913509149729a03d06904c43da9fa8dfa47
Author: Oleksandr Shneyder <o.shneyder at phoca-gmbh.de>
Date: Thu May 27 09:43:22 2021 -0500
X2Go Client will send it's OS name to the broker when sending client event.
---
debian/changelog | 2 ++
src/httpbrokerclient.cpp | 12 ++++++++++--
2 files changed, 12 insertions(+), 2 deletions(-)
diff --git a/debian/changelog b/debian/changelog
index 2dc7f29..9dd108b 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -17,6 +17,8 @@ x2goclient (4.1.2.3-0x2go1) UNRELEASED; urgency=medium
- X2Go Client will send it's version to the broker when sending client
event.
- Don't close X2Go Client if settings dialog is called before broker auth.
+ - X2Go Client will send it's OS name to the broker when sending client
+ event.
[ Ryan Schmidt ]
* New upstream version (4.1.2.3):
diff --git a/src/httpbrokerclient.cpp b/src/httpbrokerclient.cpp
index 76de2d2..da3f710 100644
--- a/src/httpbrokerclient.cpp
+++ b/src/httpbrokerclient.cpp
@@ -371,6 +371,13 @@ void HttpBrokerClient::sendEvent(const QString& ev, const QString& id, const QSt
if(mainWindow->getUsePGPCard())
brokerUser=mainWindow->getCardLogin();
+ QString os="linux";
+#ifdef Q_OS_WIN
+ os="windows";
+#endif
+#ifdef Q_OS_DARWIN
+ os="mac";
+#endif
if(!sshBroker)
{
QString req;
@@ -388,6 +395,7 @@ void HttpBrokerClient::sendEvent(const QString& ev, const QString& id, const QSt
"start="<<QUrl::toPercentEncoding(start)<<"&"<<
"elapsed="<<QString::number(connectionTime)<<"&"<<
"version="<<QUrl::toPercentEncoding(VERSION)<<"&"<<
+ "os="<<os<<"&"<<
"authid="<<nextAuthId;
x2goDebug << "sending request: "<< scramblePwd(req.toUtf8());
QNetworkRequest request(QUrl(config->brokerurl));
@@ -400,12 +408,12 @@ void HttpBrokerClient::sendEvent(const QString& ev, const QString& id, const QSt
if (nextAuthId.length() > 0) {
sshConnection->executeCommand ( config->sshBrokerBin+" --user "+ brokerUser +" --authid "+nextAuthId+
" --task clientevent --sid \""+id+"\" --event "+ev+" --server \""+server+"\" --client \""+client+"\" --login "+"\""+
- login+"\" --cmd \""+cmd+"\" --display \""+display+"\" --start \""+start+"\" --elapsed "+QString::number(connectionTime)+" --version \""+VERSION+"\"",
+ login+"\" --cmd \""+cmd+"\" --display \""+display+"\" --start \""+start+"\" --elapsed "+QString::number(connectionTime)+" --version \""+VERSION+"\" --os "+os,
this,SLOT ( slotEventSent(bool,QString,int)));
} else {
sshConnection->executeCommand ( config->sshBrokerBin+" --user "+ brokerUser +
" --task clientevent --sid \""+id+"\" --event "+ev+" --server \""+server+"\" --client \""+client+"\" --login "+"\""+
- login+"\" --cmd \""+cmd+"\" --display \""+display+"\" --start \""+start+"\" --elapsed "+QString::number(connectionTime)+" --version \""+VERSION+"\"",
+ login+"\" --cmd \""+cmd+"\" --display \""+display+"\" --start \""+start+"\" --elapsed "+QString::number(connectionTime)+" --version \""+VERSION+"\" --os "+os,
this,SLOT ( slotEventSent(bool,QString,int)));
}
}
--
Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/x2goclient.git
More information about the x2go-commits
mailing list