This is an automated email from the git hooks/post-receive script. x2go pushed a change to branch master in repository x2goclient. from e7e2e4e src/pulsemanager.cpp: fix up a debug string. new 43da15a src/sshmasterconnection.cpp: libssh < 0.6.0 does not have the ssh_options_get () API, but instead expects users to pull out information directly from the ssh_session structure. The 1 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "adds" were already present in the repository and have only been added to this reference. Summary of changes: debian/changelog | 4 ++++ src/sshmasterconnection.cpp | 37 +++++++++++++++++++++++++++++++++++++ 2 files changed, 41 insertions(+) -- Alioth's /srv/git/code.x2go.org/x2goclient.git//..//_hooks_/post-receive-email on /srv/git/code.x2go.org/x2goclient.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch master in repository x2goclient. commit 43da15a4074378ef81c33e97aa79a72f7f0d6202 Author: Mihai Moldovan <ionic@ionic.de> Date: Thu Feb 23 06:05:26 2017 +0100 src/sshmasterconnection.cpp: libssh < 0.6.0 does not have the ssh_options_get () API, but instead expects users to pull out information directly from the ssh_session structure. This fixes compile issues on systems with older libssh versions. --- debian/changelog | 4 ++++ src/sshmasterconnection.cpp | 37 +++++++++++++++++++++++++++++++++++++ 2 files changed, 41 insertions(+) diff --git a/debian/changelog b/debian/changelog index 0e8cf77..713e269 100644 --- a/debian/changelog +++ b/debian/changelog @@ -63,6 +63,10 @@ x2goclient (4.1.0.1-0x2go1) UNRELEASED; urgency=medium - src/pulsemanager.cpp: fix up a debug string. Qt drops a space where I'd like to have one and inserts a space where I'd like none, so work around that fancifully. + - src/sshmasterconnection.cpp: libssh < 0.6.0 does not have the + ssh_options_get () API, but instead expects users to pull out + information directly from the ssh_session structure. This fixes compile + issues on systems with older libssh versions. -- X2Go Release Manager <git-admin@x2go.org> Wed, 22 Feb 2017 07:13:10 +0100 diff --git a/src/sshmasterconnection.cpp b/src/sshmasterconnection.cpp index f16bf85..f99a1bd 100644 --- a/src/sshmasterconnection.cpp +++ b/src/sshmasterconnection.cpp @@ -224,7 +224,11 @@ SshMasterConnection::SshMasterConnection (QObject* parent, QString host, int por } char *inferred_username = NULL; +#if LIBSSH_VERSION_INT < SSH_VERSION_INT (0, 6, 0) + inferred_username = tmp_session->username; +#else ssh_options_get (tmp_session, SSH_OPTIONS_USER, &inferred_username); +#endif x2goDebug << "Temporary session user name after config file parse: " << inferred_username; this->user = QString::fromLocal8Bit (inferred_username); @@ -825,7 +829,11 @@ bool SshMasterConnection::sshConnect() } unsigned int cur_port = 0; +#if LIBSSH_VERSION_INT < SSH_VERSION_INT (0, 6, 0) + cur_port = my_ssh_session->port; +#else ssh_options_get_port (my_ssh_session, &cur_port); +#endif x2goDebug << "Session port before config file parse: " << cur_port; /* Parse ~/.ssh/config. */ @@ -833,7 +841,11 @@ bool SshMasterConnection::sshConnect() x2goDebug << "Warning: unable to parse the SSH config file."; } +#if LIBSSH_VERSION_INT < SSH_VERSION_INT (0, 6, 0) + cur_port = my_ssh_session->port; +#else ssh_options_get_port (my_ssh_session, &cur_port); +#endif x2goDebug << "Session port after config file parse: " << cur_port; rc = ssh_connect ( my_ssh_session ); @@ -850,7 +862,11 @@ bool SshMasterConnection::sshConnect() } } +#if LIBSSH_VERSION_INT < SSH_VERSION_INT (0, 6, 0) + cur_port = my_ssh_session->port; +#else ssh_options_get_port (my_ssh_session, &cur_port); +#endif x2goDebug << "Session port before config file parse (part 2): " << cur_port; /* Parse ~/.ssh/config. */ @@ -858,7 +874,11 @@ bool SshMasterConnection::sshConnect() x2goDebug << "Warning: unable to parse the SSH config file."; } +#if LIBSSH_VERSION_INT < SSH_VERSION_INT (0, 6, 0) + cur_port = my_ssh_session->port; +#else ssh_options_get_port (my_ssh_session, &cur_port); +#endif x2goDebug << "Session port after config file parse (part 2): " << cur_port; return true; @@ -1679,17 +1699,34 @@ void SshMasterConnection::channelLoop() } unsigned int inferred_port = 0; +#if LIBSSH_VERSION_INT < SSH_VERSION_INT (0, 6, 0) + inferred_port = tmp_session->port; +#else ssh_options_get_port (tmp_session, &inferred_port); +#endif x2goDebug << "Temporary session port after config file parse: " << inferred_port; char *inferred_host = NULL; +#if LIBSSH_VERSION_INT < SSH_VERSION_INT (0, 6, 0) + if (inferred_host) { + inferred_host = strdup(tmp_session->host); + } + else { + x2goDebug << "Temporary session host after config file parse NULL; should not happen, as it was set before."; + } +#else ssh_options_get (tmp_session, SSH_OPTIONS_HOST, &inferred_host); +#endif x2goDebug << "Temporary session host after config file parse: " << inferred_host; channelConnections[i].forwardHost = QString (inferred_host); channelConnections[i].forwardPort = static_cast<int> (inferred_port); +#if LIBSSH_VERSION_INT < SSH_VERSION_INT (0, 6, 0) + free (inferred_host); +#else ssh_string_free_char (inferred_host); +#endif ssh_free (tmp_session); } -- Alioth's /srv/git/code.x2go.org/x2goclient.git//..//_hooks_/post-receive-email on /srv/git/code.x2go.org/x2goclient.git