summaryrefslogtreecommitdiff
path: root/core/launcher/transferserver.cpp
Unidiff
Diffstat (limited to 'core/launcher/transferserver.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--core/launcher/transferserver.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/core/launcher/transferserver.cpp b/core/launcher/transferserver.cpp
index b998e95..a5e20b2 100644
--- a/core/launcher/transferserver.cpp
+++ b/core/launcher/transferserver.cpp
@@ -70,13 +70,13 @@ TransferServer::TransferServer( Q_UINT16 port, QObject *parent,
70 70
71void TransferServer::authorizeConnections() 71void TransferServer::authorizeConnections()
72{ 72{
73 QListIterator<ServerPI> it(connections); 73 QListIterator<ServerPI> it(connections);
74 while ( it.current() ) { 74 while ( it.current() ) {
75 if ( !it.current()->verifyAuthorised() ) { 75 if ( !it.current()->verifyAuthorised() ) {
76 disconnect( it.current(), SIGNAL(connectionClosed(ServerPI *)), this, SLOT( closed(ServerPI *)) ); 76 disconnect( it.current(), SIGNAL(connectionClosed(ServerPI*)), this, SLOT( closed(ServerPI*)) );
77 connections.removeRef( it.current() ); 77 connections.removeRef( it.current() );
78 } else 78 } else
79 ++it; 79 ++it;
80 } 80 }
81} 81}
82 82
@@ -89,13 +89,13 @@ TransferServer::~TransferServer()
89{ 89{
90} 90}
91 91
92void TransferServer::newConnection( int socket ) 92void TransferServer::newConnection( int socket )
93{ 93{
94 ServerPI *ptr = new ServerPI( socket, this ); 94 ServerPI *ptr = new ServerPI( socket, this );
95 connect( ptr, SIGNAL(connectionClosed(ServerPI *)), this, SLOT( closed(ServerPI *)) ); 95 connect( ptr, SIGNAL(connectionClosed(ServerPI*)), this, SLOT( closed(ServerPI*)) );
96 connections.append( ptr ); 96 connections.append( ptr );
97} 97}
98 98
99QString SyncAuthentication::serverId() 99QString SyncAuthentication::serverId()
100{ 100{
101 Config cfg("Security"); 101 Config cfg("Security");
@@ -330,25 +330,25 @@ ServerPI::ServerPI( int socket, QObject *parent, const char* name )
330 send( "220 Qtopia " QPE_VERSION " FTP Server" ); // No tr 330 send( "220 Qtopia " QPE_VERSION " FTP Server" ); // No tr
331 state = Wait_USER; 331 state = Wait_USER;
332 332
333 dtp = new ServerDTP( this ); 333 dtp = new ServerDTP( this );
334 connect( dtp, SIGNAL( completed() ), SLOT( dtpCompleted() ) ); 334 connect( dtp, SIGNAL( completed() ), SLOT( dtpCompleted() ) );
335 connect( dtp, SIGNAL( failed() ), SLOT( dtpFailed() ) ); 335 connect( dtp, SIGNAL( failed() ), SLOT( dtpFailed() ) );
336 connect( dtp, SIGNAL( error( int ) ), SLOT( dtpError( int ) ) ); 336 connect( dtp, SIGNAL( error(int) ), SLOT( dtpError(int) ) );
337 337
338 338
339 directory = QDir::currentDirPath(); 339 directory = QDir::currentDirPath();
340 340
341 static int p = 1024; 341 static int p = 1024;
342 342
343 while ( !serversocket || !serversocket->ok() ) { 343 while ( !serversocket || !serversocket->ok() ) {
344 delete serversocket; 344 delete serversocket;
345 serversocket = new ServerSocket( ++p, this ); 345 serversocket = new ServerSocket( ++p, this );
346 } 346 }
347 connect( serversocket, SIGNAL( newIncomming( int ) ), 347 connect( serversocket, SIGNAL( newIncomming(int) ),
348 SLOT( newConnection( int ) ) ); 348 SLOT( newConnection(int) ) );
349 } 349 }
350} 350}
351 351
352ServerPI::~ServerPI() 352ServerPI::~ServerPI()
353{ 353{
354 close(); 354 close();
@@ -1083,13 +1083,13 @@ ServerDTP::ServerDTP( QObject *parent, const char* name)
1083 : QSocket( parent, name ), mode( Idle ), createTargzProc( 0 ), 1083 : QSocket( parent, name ), mode( Idle ), createTargzProc( 0 ),
1084 retrieveTargzProc( 0 ) 1084 retrieveTargzProc( 0 )
1085{ 1085{
1086 1086
1087 connect( this, SIGNAL( connected() ), SLOT( connected() ) ); 1087 connect( this, SIGNAL( connected() ), SLOT( connected() ) );
1088 connect( this, SIGNAL( connectionClosed() ), SLOT( connectionClosed() ) ); 1088 connect( this, SIGNAL( connectionClosed() ), SLOT( connectionClosed() ) );
1089 connect( this, SIGNAL( bytesWritten( int ) ), SLOT( bytesWritten( int ) ) ); 1089 connect( this, SIGNAL( bytesWritten(int) ), SLOT( bytesWritten(int) ) );
1090 connect( this, SIGNAL( readyRead() ), SLOT( readyRead() ) ); 1090 connect( this, SIGNAL( readyRead() ), SLOT( readyRead() ) );
1091 1091
1092 createTargzProc = new QProcess( QString("tar"), this, "createTargzProc"); // No tr 1092 createTargzProc = new QProcess( QString("tar"), this, "createTargzProc"); // No tr
1093 createTargzProc->setCommunication( QProcess::Stdout ); 1093 createTargzProc->setCommunication( QProcess::Stdout );
1094 createTargzProc->setWorkingDirectory( QDir::rootDirPath() ); 1094 createTargzProc->setWorkingDirectory( QDir::rootDirPath() );
1095 connect( createTargzProc, SIGNAL( processExited() ), SLOT( targzDone() ) ); 1095 connect( createTargzProc, SIGNAL( processExited() ), SLOT( targzDone() ) );