[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: branches/KDE/3.5/kdelibs
From: Luboš Luňák <l.lunak () kde ! org>
Date: 2007-09-18 17:05:13
Message-ID: 1190135113.464484.11327.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 714066 by lunakl:
Process incomming dcop calls in kioslaves, otherwise they'll
block broadcasts done with DCOPClient::call() (bnc:301648).
M +4 -2 dcop/dcopclient.cpp
M +2 -2 dcop/dcopclient.h
M +15 -3 kio/kio/slavebase.cpp
--- branches/KDE/3.5/kdelibs/dcop/dcopclient.cpp #714065:714066
@@ -1998,12 +1998,14 @@
return;
if ( d->non_blocking_call_lock ) {
- qApp->exit_loop();
+ if( qApp )
+ qApp->exit_loop();
return;
}
if (!d->iceConn) {
- d->notifier->deleteLater();
+ if( d->notifier )
+ d->notifier->deleteLater();
d->notifier = 0;
qWarning("received an error processing data from the DCOP server!");
return;
--- branches/KDE/3.5/kdelibs/dcop/dcopclient.h #714065:714066
@@ -793,14 +793,14 @@
void callBack(int, const QCString&, const QByteArray &);
public slots:
-
-protected slots:
/**
* Process data from the socket.
* @param socknum the fd of the socket
*/
void processSocketData(int socknum);
+protected slots:
+
private slots:
void processPostedMessagesInternal();
void asyncReplyReady();
--- branches/KDE/3.5/kdelibs/kio/kio/slavebase.cpp #714065:714066
@@ -249,6 +249,7 @@
d->dcopClient = KApplication::dcopClient();
if (!d->dcopClient->isAttached())
d->dcopClient->attach();
+ d->dcopClient->setDaemonMode( true );
}
return d->dcopClient;
}
@@ -271,18 +272,25 @@
FD_ZERO(&rfds);
assert(appconn->inited());
+ int maxfd = appconn->fd_from();
FD_SET(appconn->fd_from(), &rfds);
+ if( d->dcopClient )
+ {
+ FD_SET( d->dcopClient->socket(), &rfds );
+ if( d->dcopClient->socket() > maxfd )
+ maxfd = d->dcopClient->socket();
+ }
if (!d->timeout) // we can wait forever
{
- retval = select(appconn->fd_from()+ 1, &rfds, NULL, NULL, NULL);
+ retval = select( maxfd + 1, &rfds, NULL, NULL, NULL);
}
else
{
struct timeval tv;
tv.tv_sec = kMax(d->timeout-time(0),(time_t) 1);
tv.tv_usec = 0;
- retval = select(appconn->fd_from()+ 1, &rfds, NULL, NULL, &tv);
+ retval = select( maxfd + 1, &rfds, NULL, NULL, &tv);
}
if ((retval>0) && FD_ISSET(appconn->fd_from(), &rfds))
{ // dispatch application messages
@@ -308,8 +316,12 @@
}
}
}
- else if ((retval<0) && (errno != EINTR))
+ if( retval > 0 && d->dcopClient && FD_ISSET( d->dcopClient->socket(), &rfds \
)) {
+ d->dcopClient->processSocketData( d->dcopClient->socket());
+ }
+ if ((retval<0) && (errno != EINTR))
+ {
kdDebug(7019) << "dispatchLoop(): select returned " << retval << " "
<< (errno==EBADF?"EBADF":errno==EINTR?"EINTR":errno==EINVAL?"EINVAL":errno==ENOMEM?"ENOMEM":"unknown")
<< " (" << errno << ")" << endl;
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic