This is an automated email from the git hooks/post-receive script. x2go pushed a change to branch feature/libssh-api-upgrade in repository x2goclient. from e249b8c src/sshmasterconnection.cpp: replace deprecated channel_free () function with ssh_channel_free (). new 1c2c520 src/sshmasterconnection.cpp: use QString::arg () to insert function name and thus deduplicate error translation messages. 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 | 3 +++ src/sshmasterconnection.cpp | 31 ++++++++++++++++--------------- 2 files changed, 19 insertions(+), 15 deletions(-) -- 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 feature/libssh-api-upgrade in repository x2goclient. commit 1c2c5209fc9497c66207e1c43177a3e6781d1fa0 Author: Mihai Moldovan <ionic@ionic.de> Date: Sat Jan 28 18:34:46 2017 +0100 src/sshmasterconnection.cpp: use QString::arg () to insert function name and thus deduplicate error translation messages. Also re-add the full stop sign and remove it when needed for x2goDebug. --- debian/changelog | 3 +++ src/sshmasterconnection.cpp | 31 ++++++++++++++++--------------- 2 files changed, 19 insertions(+), 15 deletions(-) diff --git a/debian/changelog b/debian/changelog index b9533da..82246cc 100644 --- a/debian/changelog +++ b/debian/changelog @@ -602,6 +602,9 @@ x2goclient (4.1.0.0-0x2go1) UNRELEASED; urgency=medium - src/sshmasterconnection.cpp: replace deprecated channel_free () function with ssh_channel_free (). Might break on ancient systems, but we don't care. + - src/sshmasterconnection.cpp: use QString::arg () to insert function name + and thus deduplicate error translation messages. Also re-add the full + stop sign and remove it when needed for x2goDebug. [ Bernard Cafarelli ] * New upstream version (4.1.0.0): diff --git a/src/sshmasterconnection.cpp b/src/sshmasterconnection.cpp index 84d8e53..13432a6 100644 --- a/src/sshmasterconnection.cpp +++ b/src/sshmasterconnection.cpp @@ -1553,11 +1553,12 @@ void SshMasterConnection::channelLoop() if (!channel) { QString err = ssh_get_error (my_ssh_session); - QString error_msg = tr ("ssh_channel_new failed"); - emit ioErr (channelConnections[i].creator, error_msg + ".", err); + /*: Argument in this context will be a function name. */ + QString error_msg = tr ("%1 failed.").arg ("ssh_channel_new"); + emit ioErr (channelConnections[i].creator, error_msg, err); #ifdef DEBUG - x2goDebug << errorMsg << ": " << err << endl; + x2goDebug << errorMsg.left (errorMsg.size () - 1) << ": " << err << endl; #endif continue; @@ -1578,10 +1579,10 @@ void SshMasterConnection::channelLoop() channelConnections.at ( i ).localPort ) != SSH_OK ) { QString err=ssh_get_error ( my_ssh_session ); - QString errorMsg=tr ( "ssh_channel_open_forward failed" ); - emit ioErr ( channelConnections[i].creator, errorMsg + ".", err ); + QString errorMsg=tr ( "%1 failed." ).arg ("ssh_channel_open_forward"); + emit ioErr ( channelConnections[i].creator, errorMsg, err ); #ifdef DEBUG - x2goDebug<<errorMsg<<": "<<err<<endl; + x2goDebug<<errorMsg.left (errorMsg.size () - 1)<<": "<<err<<endl; #endif } #ifdef DEBUG @@ -1599,19 +1600,19 @@ void SshMasterConnection::channelLoop() if ( ssh_channel_open_session ( channel ) !=SSH_OK ) { QString err=ssh_get_error ( my_ssh_session ); - QString errorMsg=tr ( "ssh_channel_open_session failed" ); - emit ioErr ( channelConnections[i].creator, errorMsg + ".", err ); + QString errorMsg=tr ( "%1 failed." ).arg ("ssh_channel_open_session"); + emit ioErr ( channelConnections[i].creator, errorMsg, err ); #ifdef DEBUG - x2goDebug<<errorMsg<<": "<<err<<endl; + x2goDebug<<errorMsg.left (errorMsg.size () - 1)<<": "<<err<<endl; #endif } else if ( ssh_channel_request_exec ( channel, channelConnections[i].command.toLatin1() ) != SSH_OK ) { QString err=ssh_get_error ( my_ssh_session ); - QString errorMsg=tr ( "ssh_channel_request_exec failed" ); - emit ioErr ( channelConnections[i].creator, errorMsg + ".", err ); + QString errorMsg=tr ( "%1 failed." ).args ("ssh_channel_request_exec"); + emit ioErr ( channelConnections[i].creator, errorMsg, err ); #ifdef DEBUG - x2goDebug<<errorMsg<<": "<<err<<endl; + x2goDebug<<errorMsg.left (errorMsg.size () - 1)<<": "<<err<<endl; #endif } #ifdef DEBUG @@ -1743,10 +1744,10 @@ void SshMasterConnection::channelLoop() if ( ssh_channel_write ( channel, buffer, nbytes ) !=nbytes ) { QString err=ssh_get_error ( my_ssh_session ); - QString errorMsg=tr ( "ssh_channel_write failed" ); - emit ioErr ( channelConnections[i].creator, errorMsg + ".", err ); + QString errorMsg=tr ( "%1 failed." ).arg ("ssh_channel_write"); + emit ioErr ( channelConnections[i].creator, errorMsg, err ); #ifdef DEBUG - x2goDebug<<errorMsg<<": "<<err<<endl; + x2goDebug<<errorMsg.left (errorMsg.size () - 1)<<": "<<err<<endl; #endif finalize ( i ); continue; -- Alioth's /srv/git/code.x2go.org/x2goclient.git//..//_hooks_/post-receive-email on /srv/git/code.x2go.org/x2goclient.git