summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/net/wellenreiter/gui/wellenreiter.cpp13
1 files changed, 4 insertions, 9 deletions
diff --git a/noncore/net/wellenreiter/gui/wellenreiter.cpp b/noncore/net/wellenreiter/gui/wellenreiter.cpp
index dd8a365..09a44e6 100644
--- a/noncore/net/wellenreiter/gui/wellenreiter.cpp
+++ b/noncore/net/wellenreiter/gui/wellenreiter.cpp
@@ -107,5 +107,5 @@ Wellenreiter::Wellenreiter( QWidget* parent )
107 flags = fcntl( daemon_fd, F_GETFL, 0 ); 107 flags = fcntl( daemon_fd, F_GETFL, 0 );
108 fcntl( daemon_fd, F_SETFL, flags | O_NONBLOCK ); 108 fcntl( daemon_fd, F_SETFL, flags | O_NONBLOCK );
109 QSocketNotifier *sn = new QSocketNotifier( daemon_fd, QSocketNotifier::Read, parent ); 109 QSocketNotifier *sn = new QSocketNotifier( daemon_fd, QSocketNotifier::Read, this );
110 connect( sn, SIGNAL( activated( int ) ), this, SLOT( dataReceived() ) ); 110 connect( sn, SIGNAL( activated( int ) ), this, SLOT( dataReceived() ) );
111 } 111 }
@@ -125,16 +125,11 @@ Wellenreiter::~Wellenreiter()
125 delete manufacturerdb; 125 delete manufacturerdb;
126 126
127 // X11-only - Hmm... Closing the socket here segfaults on exit,
128 // Maybe because the notifier still has a handle to it!? Seems not to
129 // occur on Qt/Embedded
130
131 #ifdef QWS
132 if ( daemon_fd != -1 ) 127 if ( daemon_fd != -1 )
133 { 128 {
134 qDebug( "closing comm socket" ); 129 qDebug( "closing comm socket" );
135 close( daemon_fd ); 130 ::shutdown( daemon_fd, 0 );
131 ::close( daemon_fd );
132 qDebug( "comm socket closed." );
136 } 133 }
137 #endif
138
139} 134}
140 135