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.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/core/launcher/transferserver.cpp b/core/launcher/transferserver.cpp
index a5e20b2..e32cf41 100644
--- a/core/launcher/transferserver.cpp
+++ b/core/launcher/transferserver.cpp
@@ -38,48 +38,49 @@
38#include <time.h> 38#include <time.h>
39#endif 39#endif
40 40
41 41
42#if defined(_OS_LINUX_) 42#if defined(_OS_LINUX_)
43#include <shadow.h> 43#include <shadow.h>
44#endif 44#endif
45 45
46#include <qtextstream.h> 46#include <qtextstream.h>
47#include <qmessagebox.h> 47#include <qmessagebox.h>
48//#include <qtopia/qcopchannel_qws.h> 48//#include <qtopia/qcopchannel_qws.h>
49#include <qtopia/process.h> 49#include <qtopia/process.h>
50#include <qtopia/private/contact.h> 50#include <qtopia/private/contact.h>
51#include <qtopia/version.h> 51#include <qtopia/version.h>
52#ifdef Q_WS_QWS 52#ifdef Q_WS_QWS
53#include <qtopia/qcopenvelope_qws.h> 53#include <qtopia/qcopenvelope_qws.h>
54#endif 54#endif
55 55
56 56
57#include "transferserver.h" 57#include "transferserver.h"
58#include <qtopia/qprocess.h> 58#include <qtopia/qprocess.h>
59 59
60const int block_size = 51200; 60const int block_size = 51200;
61 61
62using namespace Opie::Core;
62TransferServer::TransferServer( Q_UINT16 port, QObject *parent, 63TransferServer::TransferServer( Q_UINT16 port, QObject *parent,
63 const char* name) 64 const char* name)
64 : QServerSocket( port, 1, parent, name ) 65 : QServerSocket( port, 1, parent, name )
65{ 66{
66 connections.setAutoDelete( TRUE ); 67 connections.setAutoDelete( TRUE );
67 if ( !ok() ) 68 if ( !ok() )
68 qWarning( "Failed to bind to port %d", port ); 69 qWarning( "Failed to bind to port %d", port );
69} 70}
70 71
71void TransferServer::authorizeConnections() 72void TransferServer::authorizeConnections()
72{ 73{
73 QListIterator<ServerPI> it(connections); 74 QListIterator<ServerPI> it(connections);
74 while ( it.current() ) { 75 while ( it.current() ) {
75 if ( !it.current()->verifyAuthorised() ) { 76 if ( !it.current()->verifyAuthorised() ) {
76 disconnect( it.current(), SIGNAL(connectionClosed(ServerPI*)), this, SLOT( closed(ServerPI*)) ); 77 disconnect( it.current(), SIGNAL(connectionClosed(ServerPI*)), this, SLOT( closed(ServerPI*)) );
77 connections.removeRef( it.current() ); 78 connections.removeRef( it.current() );
78 } else 79 } else
79 ++it; 80 ++it;
80 } 81 }
81} 82}
82 83
83void TransferServer::closed(ServerPI *item) 84void TransferServer::closed(ServerPI *item)
84{ 85{
85 connections.removeRef(item); 86 connections.removeRef(item);