[X2Go-Commits] x2godesktopsharing.git - build-main (branch) updated: 3.0.1.2-13-ga17eb04
X2Go dev team
git-admin at x2go.org
Sat Jun 8 01:13:22 CEST 2013
The branch, build-main has been updated
via a17eb04222eac5aee009924f004df2ad6342eb34 (commit)
from 37b57f64cab0f715aae80056a5c0053eafb3390d (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
-----------------------------------------------------------------------
Summary of changes:
main.cpp | 162 +++++++++++++++++++++++++++++++-------------------------------
1 file changed, 81 insertions(+), 81 deletions(-)
The diff of changes is:
diff --git a/main.cpp b/main.cpp
index 7917c66..e14c578 100644
--- a/main.cpp
+++ b/main.cpp
@@ -27,101 +27,101 @@
#include <iostream>
#include <QDir>
-
using namespace std;
void client ( const QStringList & cmd )
{
- if ( cmd.size() !=11 )
- {
- cerr<<"wrong parameters"<<endl;
- cout<<"DENY";
- return;
- }
- QStringList params=cmd[9].split ( "XSHAD" );
- if ( params.size() !=3 )
- {
- cerr<<"wrong parameters"<<endl;
- cout<<"DENY";
- return;
- }
+ if ( cmd.size() !=11 )
+ {
+ cerr<<"wrong parameters"<<endl;
+ cout<<"DENY";
+ return;
+ }
+ QStringList params=cmd[9].split ( "XSHAD" );
+ if ( params.size() !=3 )
+ {
+ cerr<<"wrong parameters"<<endl;
+ cout<<"DENY";
+ return;
+ }
- cerr<<"starting x2godesktopsharing in client mode, cmd: "<<
- cmd.join(" ").toAscii().data() <<std::endl;
+ cerr<<"starting x2godesktopsharing in client mode, cmd: "<<
+ cmd.join(" ").toAscii().data() <<std::endl;
- QString dispname=params[2];
- QString socketName=QDir::tempPath() +"/x2godesktopsharing_@"+
- params[1]+"@"+dispname;
- QLocalSocket sock;
- sock.connectToServer ( socketName );
- if ( !sock.waitForConnected ( 3000 ) )
- {
- QString message="Unable to connect: " +socketName;
- cout<<"DENY";
- cerr<<message.toAscii().data() <<endl;
- return;
- }
- sock.write ( cmd.join(" ").toAscii().data(),cmd.join(" ").toAscii().length() );
- if ( !sock.waitForReadyRead() )
- {
- cout<<"DENY";
- cerr<<"Cannot write to socket: "<<socketName.toAscii().data() <<endl;
- return;;
- }
- char buffer[256];
- int read=sock.read ( buffer,255 );
- if ( read<=0 )
- {
- cout<<"DENY";
- cerr<<"Cannot read from socket: " <<socketName.toAscii().data() <<endl;
- return;
- }
- buffer[read]=0;
- cout<<buffer<<endl;
+ QString dispname=params[2];
+ QString socketName=QDir::tempPath() +"/x2godesktopsharing_@"+
+ params[1]+"@"+dispname;
+ QLocalSocket sock;
+ sock.connectToServer ( socketName );
+ if ( !sock.waitForConnected ( 3000 ) )
+ {
+ QString message="Unable to connect: " +socketName;
+ cout<<"DENY";
+ cerr<<message.toAscii().data() <<endl;
+ return;
+ }
+ sock.write ( cmd.join(" ").toAscii().data(),cmd.join(" ").toAscii().length() );
+ if ( !sock.waitForReadyRead() )
+ {
+ cout<<"DENY";
+ cerr<<"Cannot write to socket: "<<socketName.toAscii().data() <<endl;
+ return;;
+ }
+ char buffer[256];
+ int read=sock.read ( buffer,255 );
+ if ( read<=0 )
+ {
+ cout<<"DENY";
+ cerr<<"Cannot read from socket: " <<socketName.toAscii().data() <<endl;
+ return;
+ }
+ buffer[read]=0;
+ cout<<buffer<<endl;
}
int main ( int argc, char *argv[] )
{
- if ( argc>2 )
- {
- QString par=argv[1];
- if ( par == "client" )
- {
- QStringList cmdl;
- for ( int i=2; i<argc;++i )
- cmdl<<argv[i];
- client ( cmdl );
- return 0;
- }
- }
- QApplication app ( argc,argv );
- QTranslator translator;
- QString filename=QString ( ":/x2godesktopsharing_%1" ).arg (
- QLocale::system().name() );
- filename=filename.toLower();
- if ( !translator.load ( filename ) )
- {
- qDebug ( "Can't load translator (%s) !\n",
- filename.toLocal8Bit().data() );
- }
- else
- app.installTranslator ( &translator );
+ if ( argc>2 )
+ {
+ QString par=argv[1];
+ if ( par == "client" )
+ {
+ QStringList cmdl;
+ for ( int i=2; i<argc;++i )
+ cmdl<<argv[i];
+ client ( cmdl );
+ return 0;
+ }
+ }
+ QApplication app ( argc,argv );
+ QTranslator translator;
+ QString filename=QString ( ":/x2godesktopsharing_%1" ).arg (
+ QLocale::system().name() );
+ filename=filename.toLower();
+ if ( !translator.load ( filename ) )
+ {
+ qDebug ( "Can't load translator (%s) !\n",
+ filename.toLocal8Bit().data() );
+ }
+ else
+ app.installTranslator ( &translator );
- QTranslator qtTranslator;
- filename=QString ( ":/qt_%1" ).arg ( QLocale::system().name() );
- if ( !qtTranslator.load ( filename ) )
- {
- qDebug ( "Can't load translator (%s) !\n",
- filename.toLocal8Bit().data() );
- }
- else
- app.installTranslator ( &qtTranslator );
- ShareTray* tray=new ShareTray;
- tray->hide();
+ QTranslator qtTranslator;
+ filename=QString ( ":/qt_%1" ).arg ( QLocale::system().name() );
+ if ( !qtTranslator.load ( filename ) )
+ {
+ qDebug ( "Can't load translator (%s) !\n",
+ filename.toLocal8Bit().data() );
+ }
+ else
+ app.installTranslator ( &qtTranslator );
+ ShareTray* tray=new ShareTray;
+ tray->hide();
- return app.exec();
+ return app.exec();
}
+
hooks/post-receive
--
x2godesktopsharing.git (Desktop Sharing for X2Go)
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "x2godesktopsharing.git" (Desktop Sharing for X2Go).
More information about the x2go-commits
mailing list