summaryrefslogtreecommitdiff
path: root/core
Unidiff
Diffstat (limited to 'core') (more/less context) (show whitespace changes)
-rw-r--r--core/launcher/qcopbridge.cpp2
-rw-r--r--core/launcher/transferserver.cpp3
2 files changed, 5 insertions, 0 deletions
diff --git a/core/launcher/qcopbridge.cpp b/core/launcher/qcopbridge.cpp
index e339dc7..64eb096 100644
--- a/core/launcher/qcopbridge.cpp
+++ b/core/launcher/qcopbridge.cpp
@@ -42,12 +42,13 @@ using namespace Opie::Core;
42#ifndef _XOPEN_SOURCE 42#ifndef _XOPEN_SOURCE
43#define _XOPEN_SOURCE 43#define _XOPEN_SOURCE
44#endif 44#endif
45#ifndef Q_OS_WIN32 45#ifndef Q_OS_WIN32
46#include <pwd.h> 46#include <pwd.h>
47#include <unistd.h> 47#include <unistd.h>
48#include <fcntl.h>
48#include <sys/types.h> 49#include <sys/types.h>
49#endif 50#endif
50 51
51#if defined(_OS_LINUX_) 52#if defined(_OS_LINUX_)
52#include <shadow.h> 53#include <shadow.h>
53#endif 54#endif
@@ -60,12 +61,13 @@ QCopBridge::QCopBridge( Q_UINT16 port, QObject *parent,
60 desktopChannel( 0 ), 61 desktopChannel( 0 ),
61 cardChannel( 0 ) 62 cardChannel( 0 )
62{ 63{
63 if ( !ok() ) 64 if ( !ok() )
64 owarn << "Failed to bind to port " << port << "" << oendl; 65 owarn << "Failed to bind to port " << port << "" << oendl;
65 else { 66 else {
67 ::fcntl( socket(), F_SETFD, FD_CLOEXEC );
66#ifndef QT_NO_COP 68#ifndef QT_NO_COP
67 desktopChannel = new QCopChannel( "QPE/Desktop", this ); 69 desktopChannel = new QCopChannel( "QPE/Desktop", this );
68 connect( desktopChannel, SIGNAL(received(const QCString&,const QByteArray&)), 70 connect( desktopChannel, SIGNAL(received(const QCString&,const QByteArray&)),
69 this, SLOT(desktopMessage(const QCString&,const QByteArray&)) ); 71 this, SLOT(desktopMessage(const QCString&,const QByteArray&)) );
70 cardChannel = new QCopChannel( "QPE/Card", this ); 72 cardChannel = new QCopChannel( "QPE/Card", this );
71 connect( cardChannel, SIGNAL(received(const QCString&,const QByteArray&)), 73 connect( cardChannel, SIGNAL(received(const QCString&,const QByteArray&)),
diff --git a/core/launcher/transferserver.cpp b/core/launcher/transferserver.cpp
index 2b2e435..a219c0f 100644
--- a/core/launcher/transferserver.cpp
+++ b/core/launcher/transferserver.cpp
@@ -36,12 +36,13 @@ using namespace Opie::Core;
36#include <qmessagebox.h> 36#include <qmessagebox.h>
37 37
38/* STD */ 38/* STD */
39#include <pwd.h> 39#include <pwd.h>
40#include <sys/types.h> 40#include <sys/types.h>
41#include <unistd.h> 41#include <unistd.h>
42#include <fcntl.h>
42#include <stdlib.h> 43#include <stdlib.h>
43#include <time.h> 44#include <time.h>
44 45
45#ifndef Q_OS_MACX 46#ifndef Q_OS_MACX
46#include <shadow.h> 47#include <shadow.h>
47#include <crypt.h> 48#include <crypt.h>
@@ -53,12 +54,14 @@ TransferServer::TransferServer( Q_UINT16 port, QObject *parent,
53 const char* name) 54 const char* name)
54 : QServerSocket( port, 1, parent, name ) 55 : QServerSocket( port, 1, parent, name )
55{ 56{
56 connections.setAutoDelete( TRUE ); 57 connections.setAutoDelete( TRUE );
57 if ( !ok() ) 58 if ( !ok() )
58 owarn << "Failed to bind to port " << port << "" << oendl; 59 owarn << "Failed to bind to port " << port << "" << oendl;
60 else
61 ::fcntl( socket(), F_SETFD, FD_CLOEXEC );
59} 62}
60 63
61void TransferServer::authorizeConnections() 64void TransferServer::authorizeConnections()
62{ 65{
63 QListIterator<ServerPI> it(connections); 66 QListIterator<ServerPI> it(connections);
64 while ( it.current() ) { 67 while ( it.current() ) {