@ -130,7 +130,7 @@ static TQCString readQCString(TQDataStream &ds)
int bytesLeft = device - > size ( ) - device - > at ( ) ;
int bytesLeft = device - > size ( ) - device - > at ( ) ;
if ( ( bytesLeft < 0 ) | | ( len > ( uint ) bytesLeft ) )
if ( ( bytesLeft < 0 ) | | ( len > ( uint ) bytesLeft ) )
{
{
qWarning( " Corrupt data! \n " ) ;
t qWarning( " Corrupt data! \n " ) ;
printf ( " bytesLeft: %d, len: %d \n " , bytesLeft , len ) ;
printf ( " bytesLeft: %d, len: %d \n " , bytesLeft , len ) ;
return result ;
return result ;
}
}
@ -149,7 +149,7 @@ static TQByteArray readQByteArray(TQDataStream &ds)
int bytesLeft = device - > size ( ) - device - > at ( ) ;
int bytesLeft = device - > size ( ) - device - > at ( ) ;
if ( ( bytesLeft < 0 ) | | ( len > ( uint ) bytesLeft ) )
if ( ( bytesLeft < 0 ) | | ( len > ( uint ) bytesLeft ) )
{
{
qWarning( " Corrupt data! \n " ) ;
t qWarning( " Corrupt data! \n " ) ;
return result ;
return result ;
}
}
result . resize ( ( uint ) len ) ;
result . resize ( ( uint ) len ) ;
@ -241,7 +241,7 @@ void DCOPIceWriteChar(register IceConn iceConn, unsigned long nbytes, char *ptr)
{
{
DCOPConnection * conn = the_server - > findConn ( iceConn ) ;
DCOPConnection * conn = the_server - > findConn ( iceConn ) ;
# ifdef DCOP_DEBUG
# ifdef DCOP_DEBUG
qWarning( " DCOPServer: DCOPIceWriteChar() Writing %d bytes [%s] " , nbytes , conn ? conn - > appId . data ( ) : " <unknown> " ) ;
t qWarning( " DCOPServer: DCOPIceWriteChar() Writing %d bytes [%s] " , nbytes , conn ? conn - > appId . data ( ) : " <unknown> " ) ;
# endif
# endif
if ( conn )
if ( conn )
@ -251,7 +251,7 @@ qWarning("DCOPServer: DCOPIceWriteChar() Writing %d bytes [%s]", nbytes, conn ?
TQByteArray _data ( nbytes ) ;
TQByteArray _data ( nbytes ) ;
memcpy ( _data . data ( ) , ptr , nbytes ) ;
memcpy ( _data . data ( ) , ptr , nbytes ) ;
# ifdef DCOP_DEBUG
# ifdef DCOP_DEBUG
qWarning( " DCOPServer: _IceWrite() outputBlocked. Queuing %d bytes. " , _data . size ( ) ) ;
t qWarning( " DCOPServer: _IceWrite() outputBlocked. Queuing %d bytes. " , _data . size ( ) ) ;
# endif
# endif
conn - > outputBuffer . append ( _data ) ;
conn - > outputBuffer . append ( _data ) ;
return ;
return ;
@ -273,14 +273,14 @@ static void DCOPIceWrite(IceConn iceConn, const TQByteArray &_data)
{
{
DCOPConnection * conn = the_server - > findConn ( iceConn ) ;
DCOPConnection * conn = the_server - > findConn ( iceConn ) ;
# ifdef DCOP_DEBUG
# ifdef DCOP_DEBUG
qWarning( " DCOPServer: DCOPIceWrite() Writing %d bytes [%s] " , _data . size ( ) , conn ? conn - > appId . data ( ) : " <unknown> " ) ;
t qWarning( " DCOPServer: DCOPIceWrite() Writing %d bytes [%s] " , _data . size ( ) , conn ? conn - > appId . data ( ) : " <unknown> " ) ;
# endif
# endif
if ( conn )
if ( conn )
{
{
if ( conn - > outputBlocked )
if ( conn - > outputBlocked )
{
{
# ifdef DCOP_DEBUG
# ifdef DCOP_DEBUG
qWarning( " DCOPServer: DCOPIceWrite() outputBlocked. Queuing %d bytes. " , _data . size ( ) ) ;
t qWarning( " DCOPServer: DCOPIceWrite() outputBlocked. Queuing %d bytes. " , _data . size ( ) ) ;
# endif
# endif
conn - > outputBuffer . append ( _data ) ;
conn - > outputBuffer . append ( _data ) ;
return ;
return ;
@ -299,7 +299,7 @@ qWarning("DCOPServer: DCOPIceWrite() outputBlocked. Queuing %d bytes.", _data.si
void DCOPConnection : : waitForOutputReady ( const TQByteArray & _data , int start )
void DCOPConnection : : waitForOutputReady ( const TQByteArray & _data , int start )
{
{
# ifdef DCOP_DEBUG
# ifdef DCOP_DEBUG
qWarning( " DCOPServer: waitForOutputReady fd = %d datasize = %d start = %d " , socket ( ) , _data . size ( ) , start ) ;
t qWarning( " DCOPServer: waitForOutputReady fd = %d datasize = %d start = %d " , socket ( ) , _data . size ( ) , start ) ;
# endif
# endif
outputBlocked = true ;
outputBlocked = true ;
outputBuffer . append ( _data ) ;
outputBuffer . append ( _data ) ;
@ -317,7 +317,7 @@ qWarning("DCOPServer: waitForOutputReady fd = %d datasize = %d start = %d", sock
void DCOPServer : : slotOutputReady ( int socket )
void DCOPServer : : slotOutputReady ( int socket )
{
{
# ifdef DCOP_DEBUG
# ifdef DCOP_DEBUG
qWarning( " DCOPServer: slotOutputReady fd = %d " , socket ) ;
t qWarning( " DCOPServer: slotOutputReady fd = %d " , socket ) ;
# endif
# endif
// Find out connection.
// Find out connection.
DCOPConnection * conn = fd_clients . find ( socket ) ;
DCOPConnection * conn = fd_clients . find ( socket ) ;
@ -351,7 +351,7 @@ void DCOPConnection::slotOutputReady()
fcntl ( fd , F_SETFL , fd_fl ) ;
fcntl ( fd , F_SETFL , fd_fl ) ;
# ifdef DCOP_DEBUG
# ifdef DCOP_DEBUG
qWarning( " DCOPServer: slotOutputReady() %d bytes written " , nwritten ) ;
t qWarning( " DCOPServer: slotOutputReady() %d bytes written " , nwritten ) ;
# endif
# endif
if ( nwritten < 0 )
if ( nwritten < 0 )
@ -370,7 +370,7 @@ qWarning("DCOPServer: slotOutputReady() %d bytes written", nwritten);
if ( outputBuffer . isEmpty ( ) )
if ( outputBuffer . isEmpty ( ) )
{
{
# ifdef DCOP_DEBUG
# ifdef DCOP_DEBUG
qWarning( " DCOPServer: slotOutputRead() all data transmitted. " ) ;
t qWarning( " DCOPServer: slotOutputRead() all data transmitted. " ) ;
# endif
# endif
outputBlocked = false ;
outputBlocked = false ;
outputBufferNotifier - > setEnabled ( false ) ;
outputBufferNotifier - > setEnabled ( false ) ;
@ -378,7 +378,7 @@ qWarning("DCOPServer: slotOutputRead() all data transmitted.");
# ifdef DCOP_DEBUG
# ifdef DCOP_DEBUG
else
else
{
{
qWarning( " DCOPServer: slotOutputRead() more data to send. " ) ;
t qWarning( " DCOPServer: slotOutputRead() more data to send. " ) ;
}
}
# endif
# endif
}
}
@ -390,7 +390,7 @@ static void DCOPIceSendData(register IceConn _iceConn,
if ( _iceConn - > outbufptr > _iceConn - > outbuf )
if ( _iceConn - > outbufptr > _iceConn - > outbuf )
{
{
# ifdef DCOP_DEBUG
# ifdef DCOP_DEBUG
qWarning( " DCOPServer: Flushing data, fd = %d " , IceConnectionNumber ( _iceConn ) ) ;
t qWarning( " DCOPServer: Flushing data, fd = %d " , IceConnectionNumber ( _iceConn ) ) ;
# endif
# endif
IceFlush ( _iceConn ) ;
IceFlush ( _iceConn ) ;
}
}
@ -713,7 +713,7 @@ void DCOPServer::processMessage( IceConn iceConn, int opcode,
{
{
DCOPConnection * conn = clients . find ( iceConn ) ;
DCOPConnection * conn = clients . find ( iceConn ) ;
if ( ! conn ) {
if ( ! conn ) {
qWarning( " DCOPServer::processMessage message from unknown connection. [opcode = %d] " , opcode ) ;
t qWarning( " DCOPServer::processMessage message from unknown connection. [opcode = %d] " , opcode ) ;
return ;
return ;
}
}
switch ( opcode ) {
switch ( opcode ) {
@ -733,13 +733,13 @@ void DCOPServer::processMessage( IceConn iceConn, int opcode,
int datalen = ba . size ( ) ;
int datalen = ba . size ( ) ;
if ( opcode = = DCOPReplyDelayed ) {
if ( opcode = = DCOPReplyDelayed ) {
if ( ! target )
if ( ! target )
qWarning( " DCOPServer::DCOPReplyDelayed for unknown connection. " ) ;
t qWarning( " DCOPServer::DCOPReplyDelayed for unknown connection. " ) ;
else if ( ! conn )
else if ( ! conn )
qWarning( " DCOPServer::DCOPReplyDelayed from unknown connection. " ) ;
t qWarning( " DCOPServer::DCOPReplyDelayed from unknown connection. " ) ;
else if ( ! conn - > waitingForDelayedReply . removeRef ( target - > iceConn ) )
else if ( ! conn - > waitingForDelayedReply . removeRef ( target - > iceConn ) )
qWarning( " DCOPServer::DCOPReplyDelayed from/to does not match. (#2) " ) ;
t qWarning( " DCOPServer::DCOPReplyDelayed from/to does not match. (#2) " ) ;
else if ( ! target - > waitingOnReply . removeRef ( iceConn ) )
else if ( ! target - > waitingOnReply . removeRef ( iceConn ) )
qWarning( " DCOPServer::DCOPReplyDelayed for client who wasn't waiting on one! " ) ;
t qWarning( " DCOPServer::DCOPReplyDelayed for client who wasn't waiting on one! " ) ;
}
}
if ( target ) {
if ( target ) {
# ifdef DCOP_DEBUG
# ifdef DCOP_DEBUG
@ -747,7 +747,7 @@ if (opcode == DCOPSend)
{
{
TQCString obj = readQCString ( ds ) ;
TQCString obj = readQCString ( ds ) ;
TQCString fun = readQCString ( ds ) ;
TQCString fun = readQCString ( ds ) ;
qWarning( " Sending %d bytes from %s to %s. DCOPSend %s " , length , fromApp . data ( ) , toApp . data ( ) , fun . data ( ) ) ;
t qWarning( " Sending %d bytes from %s to %s. DCOPSend %s " , length , fromApp . data ( ) , toApp . data ( ) , fun . data ( ) ) ;
}
}
# endif
# endif
IceGetHeader ( target - > iceConn , majorOpcode , opcode ,
IceGetHeader ( target - > iceConn , majorOpcode , opcode ,
@ -765,7 +765,7 @@ if (opcode == DCOPSend)
TQCString replyType ;
TQCString replyType ;
TQByteArray replyData ;
TQByteArray replyData ;
if ( ! receive ( toApp , obj , fun , data , replyType , replyData , iceConn ) ) {
if ( ! receive ( toApp , obj , fun , data , replyType , replyData , iceConn ) ) {
qWarning( " %s failure: object '%s' has no function '%s' " , toApp . data ( ) , obj . data ( ) , fun . data ( ) ) ;
t qWarning( " %s failure: object '%s' has no function '%s' " , toApp . data ( ) , obj . data ( ) , fun . data ( ) ) ;
}
}
} else if ( toApp [ toApp . length ( ) - 1 ] = = ' * ' ) {
} else if ( toApp [ toApp . length ( ) - 1 ] = = ' * ' ) {
# ifdef DCOP_DEBUG
# ifdef DCOP_DEBUG
@ -773,7 +773,7 @@ if (opcode == DCOPSend)
{
{
TQCString obj = readQCString ( ds ) ;
TQCString obj = readQCString ( ds ) ;
TQCString fun = readQCString ( ds ) ;
TQCString fun = readQCString ( ds ) ;
qWarning( " Sending %d bytes from %s to %s. DCOPSend %s " , length , fromApp . data ( ) , toApp . data ( ) , fun . data ( ) ) ;
t qWarning( " Sending %d bytes from %s to %s. DCOPSend %s " , length , fromApp . data ( ) , toApp . data ( ) , fun . data ( ) ) ;
}
}
# endif
# endif
// handle a multicast.
// handle a multicast.
@ -815,7 +815,7 @@ if (opcode == DCOPCall)
{
{
TQCString obj = readQCString ( ds ) ;
TQCString obj = readQCString ( ds ) ;
TQCString fun = readQCString ( ds ) ;
TQCString fun = readQCString ( ds ) ;
qWarning( " Sending %d bytes from %s to %s. DCOPCall %s " , length , fromApp . data ( ) , toApp . data ( ) , fun . data ( ) ) ;
t qWarning( " Sending %d bytes from %s to %s. DCOPCall %s " , length , fromApp . data ( ) , toApp . data ( ) , fun . data ( ) ) ;
}
}
# endif
# endif
target - > waitingForReply . append ( iceConn ) ;
target - > waitingForReply . append ( iceConn ) ;
@ -839,7 +839,7 @@ if (opcode == DCOPCall)
TQByteArray data = readQByteArray ( ds ) ;
TQByteArray data = readQByteArray ( ds ) ;
b = receive ( toApp , obj , fun , data , replyType , replyData , iceConn ) ;
b = receive ( toApp , obj , fun , data , replyType , replyData , iceConn ) ;
if ( ! b )
if ( ! b )
qWarning( " %s failure: object '%s' has no function '%s' " , toApp . data ( ) , obj . data ( ) , fun . data ( ) ) ;
t qWarning( " %s failure: object '%s' has no function '%s' " , toApp . data ( ) , obj . data ( ) , fun . data ( ) ) ;
}
}
if ( b ) {
if ( b ) {
@ -893,7 +893,7 @@ if (opcode == DCOPCall)
int datalen = ba . size ( ) ;
int datalen = ba . size ( ) ;
if ( ! connreply )
if ( ! connreply )
qWarning( " DCOPServer::DCOPReply for unknown connection. " ) ;
t qWarning( " DCOPServer::DCOPReply for unknown connection. " ) ;
else {
else {
conn - > waitingForReply . removeRef ( connreply - > iceConn ) ;
conn - > waitingForReply . removeRef ( connreply - > iceConn ) ;
if ( opcode = = DCOPReplyWait )
if ( opcode = = DCOPReplyWait )
@ -903,7 +903,7 @@ if (opcode == DCOPCall)
else
else
{ // DCOPReply or DCOPReplyFailed
{ // DCOPReply or DCOPReplyFailed
if ( ! connreply - > waitingOnReply . removeRef ( iceConn ) )
if ( ! connreply - > waitingOnReply . removeRef ( iceConn ) )
qWarning( " DCOPServer::DCOPReply from %s to %s who wasn't waiting on one! " ,
t qWarning( " DCOPServer::DCOPReply from %s to %s who wasn't waiting on one! " ,
fromApp . data ( ) , toApp . data ( ) ) ;
fromApp . data ( ) , toApp . data ( ) ) ;
}
}
IceGetHeader ( connreply - > iceConn , majorOpcode , opcode ,
IceGetHeader ( connreply - > iceConn , majorOpcode , opcode ,
@ -917,7 +917,7 @@ if (opcode == DCOPCall)
}
}
break ;
break ;
default :
default :
qWarning( " DCOPServer::processMessage unknown message " ) ;
t qWarning( " DCOPServer::processMessage unknown message " ) ;
}
}
}
}
@ -986,7 +986,7 @@ DCOPServer::DCOPServer(bool _suicide)
DCOPAuthCount , const_cast < char * * > ( DCOPAuthNames ) ,
DCOPAuthCount , const_cast < char * * > ( DCOPAuthNames ) ,
DCOPClientAuthProcs , 0 ) ;
DCOPClientAuthProcs , 0 ) ;
if ( _kde_IceLastMajorOpcode < 1 )
if ( _kde_IceLastMajorOpcode < 1 )
qWarning( " DCOPServer Error: incorrect major opcode! " ) ;
t qWarning( " DCOPServer Error: incorrect major opcode! " ) ;
the_server = this ;
the_server = this ;
if ( ( majorOpcode = IceRegisterForProtocolReply ( const_cast < char * > ( " DCOP " ) ,
if ( ( majorOpcode = IceRegisterForProtocolReply ( const_cast < char * > ( " DCOP " ) ,
@ -1004,7 +1004,7 @@ DCOPServer::DCOPServer(bool _suicide)
NULL /* IceIOErrorProc */
NULL /* IceIOErrorProc */
) ) < 0 )
) ) < 0 )
{
{
qWarning( " Could not register DCOP protocol with ICE " ) ;
t qWarning( " Could not register DCOP protocol with ICE " ) ;
}
}
char errormsg [ 256 ] ;
char errormsg [ 256 ] ;
@ -1043,10 +1043,10 @@ DCOPServer::DCOPServer(bool _suicide)
#if 0
#if 0
if ( ! SetAuthentication_local ( numTransports , listenObjs ) )
if ( ! SetAuthentication_local ( numTransports , listenObjs ) )
qFatal( " DCOPSERVER: authentication setup failed. " ) ;
t qFatal( " DCOPSERVER: authentication setup failed. " ) ;
# endif
# endif
if ( ! SetAuthentication ( numTransports , listenObjs , & authDataEntries ) )
if ( ! SetAuthentication ( numTransports , listenObjs , & authDataEntries ) )
qFatal( " DCOPSERVER: authentication setup failed. " ) ;
t qFatal( " DCOPSERVER: authentication setup failed. " ) ;
IceAddConnectionWatch ( DCOPWatchProc , static_cast < IcePointer > ( this ) ) ;
IceAddConnectionWatch ( DCOPWatchProc , static_cast < IcePointer > ( this ) ) ;
_IceWriteHandler = DCOPIceWriteChar ;
_IceWriteHandler = DCOPIceWriteChar ;
@ -1119,7 +1119,7 @@ DCOPConnection* DCOPServer::findApp( const TQCString& appId )
*/
*/
void DCOPServer : : slotCleanDeadConnections ( )
void DCOPServer : : slotCleanDeadConnections ( )
{
{
qWarning( " DCOP Cleaning up dead connections. " ) ;
t qWarning( " DCOP Cleaning up dead connections. " ) ;
while ( ! deadConnections . isEmpty ( ) )
while ( ! deadConnections . isEmpty ( ) )
{
{
IceConn iceConn = deadConnections . take ( 0 ) ;
IceConn iceConn = deadConnections . take ( 0 ) ;
@ -1158,9 +1158,9 @@ void DCOPServer::newClient( int /*socket*/ )
IceConn iceConn = IceAcceptConnection ( static_cast < const DCOPListener * > ( sender ( ) ) - > listenObj , & status ) ;
IceConn iceConn = IceAcceptConnection ( static_cast < const DCOPListener * > ( sender ( ) ) - > listenObj , & status ) ;
if ( ! iceConn ) {
if ( ! iceConn ) {
if ( status = = IceAcceptBadMalloc )
if ( status = = IceAcceptBadMalloc )
qWarning( " Failed to alloc connection object! \n " ) ;
t qWarning( " Failed to alloc connection object! \n " ) ;
else // IceAcceptFailure
else // IceAcceptFailure
qWarning( " Failed to accept ICE connection! \n " ) ;
t qWarning( " Failed to accept ICE connection! \n " ) ;
return ;
return ;
}
}
@ -1173,9 +1173,9 @@ void DCOPServer::newClient( int /*socket*/ )
if ( cstatus ! = IceConnectAccepted ) {
if ( cstatus ! = IceConnectAccepted ) {
if ( cstatus = = IceConnectIOError )
if ( cstatus = = IceConnectIOError )
qWarning ( " IO error opening ICE Connection! \n " ) ;
t qWarning ( " IO error opening ICE Connection! \n " ) ;
else
else
qWarning ( " ICE Connection rejected! \n " ) ;
t qWarning ( " ICE Connection rejected! \n " ) ;
deadConnections . removeRef ( iceConn ) ;
deadConnections . removeRef ( iceConn ) ;
( void ) IceCloseConnection ( iceConn ) ;
( void ) IceCloseConnection ( iceConn ) ;
}
}
@ -1206,7 +1206,7 @@ void DCOPServer::removeConnection( void* data )
IceConn iceConn = conn - > waitingForReply . take ( 0 ) ;
IceConn iceConn = conn - > waitingForReply . take ( 0 ) ;
if ( iceConn ) {
if ( iceConn ) {
DCOPConnection * target = clients . find ( iceConn ) ;
DCOPConnection * target = clients . find ( iceConn ) ;
qWarning( " DCOP aborting call from '%s' to '%s' " , target ? target - > appId . data ( ) : " <unknown> " , conn - > appId . data ( ) ) ;
t qWarning( " DCOP aborting call from '%s' to '%s' " , target ? target - > appId . data ( ) : " <unknown> " , conn - > appId . data ( ) ) ;
TQByteArray reply ;
TQByteArray reply ;
DCOPMsg * pMsg ;
DCOPMsg * pMsg ;
IceGetHeader ( iceConn , majorOpcode , DCOPReplyFailed ,
IceGetHeader ( iceConn , majorOpcode , DCOPReplyFailed ,
@ -1217,9 +1217,9 @@ void DCOPServer::removeConnection( void* data )
DCOPIceSendData ( iceConn , reply ) ;
DCOPIceSendData ( iceConn , reply ) ;
_DCOPIceSendEnd ( ) ;
_DCOPIceSendEnd ( ) ;
if ( ! target )
if ( ! target )
qWarning( " DCOP Error: unknown target in waitingForReply " ) ;
t qWarning( " DCOP Error: unknown target in waitingForReply " ) ;
else if ( ! target - > waitingOnReply . removeRef ( conn - > iceConn ) )
else if ( ! target - > waitingOnReply . removeRef ( conn - > iceConn ) )
qWarning( " DCOP Error: client in waitingForReply wasn't waiting on reply " ) ;
t qWarning( " DCOP Error: client in waitingForReply wasn't waiting on reply " ) ;
}
}
}
}
@ -1228,7 +1228,7 @@ void DCOPServer::removeConnection( void* data )
IceConn iceConn = conn - > waitingForDelayedReply . take ( 0 ) ;
IceConn iceConn = conn - > waitingForDelayedReply . take ( 0 ) ;
if ( iceConn ) {
if ( iceConn ) {
DCOPConnection * target = clients . find ( iceConn ) ;
DCOPConnection * target = clients . find ( iceConn ) ;
qWarning( " DCOP aborting (delayed) call from '%s' to '%s' " , target ? target - > appId . data ( ) : " <unknown> " , conn - > appId . data ( ) ) ;
t qWarning( " DCOP aborting (delayed) call from '%s' to '%s' " , target ? target - > appId . data ( ) : " <unknown> " , conn - > appId . data ( ) ) ;
TQByteArray reply ;
TQByteArray reply ;
DCOPMsg * pMsg ;
DCOPMsg * pMsg ;
IceGetHeader ( iceConn , majorOpcode , DCOPReplyFailed ,
IceGetHeader ( iceConn , majorOpcode , DCOPReplyFailed ,
@ -1239,9 +1239,9 @@ void DCOPServer::removeConnection( void* data )
DCOPIceSendData ( iceConn , reply ) ;
DCOPIceSendData ( iceConn , reply ) ;
_DCOPIceSendEnd ( ) ;
_DCOPIceSendEnd ( ) ;
if ( ! target )
if ( ! target )
qWarning( " DCOP Error: unknown target in waitingForDelayedReply " ) ;
t qWarning( " DCOP Error: unknown target in waitingForDelayedReply " ) ;
else if ( ! target - > waitingOnReply . removeRef ( conn - > iceConn ) )
else if ( ! target - > waitingOnReply . removeRef ( conn - > iceConn ) )
qWarning( " DCOP Error: client in waitingForDelayedReply wasn't waiting on reply " ) ;
t qWarning( " DCOP Error: client in waitingForDelayedReply wasn't waiting on reply " ) ;
}
}
}
}
while ( ! conn - > waitingOnReply . isEmpty ( ) )
while ( ! conn - > waitingOnReply . isEmpty ( ) )
@ -1251,19 +1251,19 @@ void DCOPServer::removeConnection( void* data )
DCOPConnection * target = clients . find ( iceConn ) ;
DCOPConnection * target = clients . find ( iceConn ) ;
if ( ! target )
if ( ! target )
{
{
qWarning( " DCOP Error: still waiting for answer from non-existing client. " ) ;
t qWarning( " DCOP Error: still waiting for answer from non-existing client. " ) ;
continue ;
continue ;
}
}
qWarning( " DCOP aborting while waiting for answer from '%s' " , target - > appId . data ( ) ) ;
t qWarning( " DCOP aborting while waiting for answer from '%s' " , target - > appId . data ( ) ) ;
if ( ! target - > waitingForReply . removeRef ( conn - > iceConn ) & &
if ( ! target - > waitingForReply . removeRef ( conn - > iceConn ) & &
! target - > waitingForDelayedReply . removeRef ( conn - > iceConn ) )
! target - > waitingForDelayedReply . removeRef ( conn - > iceConn ) )
qWarning( " DCOP Error: called client has forgotten about caller " ) ;
t qWarning( " DCOP Error: called client has forgotten about caller " ) ;
}
}
}
}
if ( ! conn - > appId . isNull ( ) ) {
if ( ! conn - > appId . isNull ( ) ) {
# ifndef NDEBUG
# ifndef NDEBUG
qDebug( " DCOP: unregister '%s' " , conn - > appId . data ( ) ) ;
t qDebug( " DCOP: unregister '%s' " , conn - > appId . data ( ) ) ;
# endif
# endif
if ( ! conn - > daemon )
if ( ! conn - > daemon )
{
{
@ -1362,7 +1362,7 @@ bool DCOPServer::receive(const TQCString &/*app*/, const TQCString &obj,
{
{
DCOPConnection * conn = clients . find ( iceConn ) ;
DCOPConnection * conn = clients . find ( iceConn ) ;
if ( conn ) {
if ( conn ) {
// qDebug("DCOPServer: %s emits %s", conn->appId.data(), fun.data());
// t qDebug("DCOPServer: %s emits %s", conn->appId.data(), fun.data());
dcopSignals - > emitSignal ( conn , fun , data , false ) ;
dcopSignals - > emitSignal ( conn , fun , data , false ) ;
}
}
replyType = " void " ;
replyType = " void " ;
@ -1385,7 +1385,7 @@ bool DCOPServer::receive(const TQCString &/*app*/, const TQCString &obj,
conn - > daemon = true ;
conn - > daemon = true ;
# ifndef NDEBUG
# ifndef NDEBUG
qDebug( " DCOP: new daemon %s " , conn - > appId . data ( ) ) ;
t qDebug( " DCOP: new daemon %s " , conn - > appId . data ( ) ) ;
# endif
# endif
currentClientNumber - - ;
currentClientNumber - - ;
@ -1429,14 +1429,14 @@ bool DCOPServer::receive(const TQCString &/*app*/, const TQCString &obj,
currentClientNumber + + ;
currentClientNumber + + ;
m_timer - > stop ( ) ; // abort termination if we were planning one
m_timer - > stop ( ) ; // abort termination if we were planning one
# ifndef NDEBUG
# ifndef NDEBUG
qDebug( " DCOP: register '%s' -> number of clients is now %d " , app2 . data ( ) , currentClientNumber ) ;
t qDebug( " DCOP: register '%s' -> number of clients is now %d " , app2 . data ( ) , currentClientNumber ) ;
# endif
# endif
}
}
# ifndef NDEBUG
# ifndef NDEBUG
else
else
{
{
oldAppId = conn - > appId ;
oldAppId = conn - > appId ;
qDebug( " DCOP: '%s' now known as '%s' " , conn - > appId . data ( ) , app2 . data ( ) ) ;
t qDebug( " DCOP: '%s' now known as '%s' " , conn - > appId . data ( ) , app2 . data ( ) ) ;
}
}
# endif
# endif
@ -1520,7 +1520,7 @@ bool DCOPServer::receive(const TQCString &/*app*/, const TQCString &obj,
TQ_INT8 Volatile ;
TQ_INT8 Volatile ;
args > > Volatile ;
args > > Volatile ;
# ifdef DCOP_DEBUG
# ifdef DCOP_DEBUG
qDebug( " DCOPServer: connectSignal(sender = %s senderObj = %s signal = %s recvObj = %s slot = %s) " , sender . data ( ) , senderObj . data ( ) , signal . data ( ) , receiverObj . data ( ) , slot . data ( ) ) ;
t qDebug( " DCOPServer: connectSignal(sender = %s senderObj = %s signal = %s recvObj = %s slot = %s) " , sender . data ( ) , senderObj . data ( ) , signal . data ( ) , receiverObj . data ( ) , slot . data ( ) ) ;
# endif
# endif
bool b = dcopSignals - > connectSignal ( sender , senderObj , signal , conn , receiverObj , slot , ( Volatile ! = 0 ) ) ;
bool b = dcopSignals - > connectSignal ( sender , senderObj , signal , conn , receiverObj , slot , ( Volatile ! = 0 ) ) ;
replyType = " bool " ;
replyType = " bool " ;
@ -1538,7 +1538,7 @@ bool DCOPServer::receive(const TQCString &/*app*/, const TQCString &obj,
TQCString receiverObj = readQCString ( args ) ;
TQCString receiverObj = readQCString ( args ) ;
TQCString slot = readQCString ( args ) ;
TQCString slot = readQCString ( args ) ;
# ifdef DCOP_DEBUG
# ifdef DCOP_DEBUG
qDebug( " DCOPServer: disconnectSignal(sender = %s senderObj = %s signal = %s recvObj = %s slot = %s) " , sender . data ( ) , senderObj . data ( ) , signal . data ( ) , receiverObj . data ( ) , slot . data ( ) ) ;
t qDebug( " DCOPServer: disconnectSignal(sender = %s senderObj = %s signal = %s recvObj = %s slot = %s) " , sender . data ( ) , senderObj . data ( ) , signal . data ( ) , receiverObj . data ( ) , slot . data ( ) ) ;
# endif
# endif
bool b = dcopSignals - > disconnectSignal ( sender , senderObj , signal , conn , receiverObj , slot ) ;
bool b = dcopSignals - > disconnectSignal ( sender , senderObj , signal , conn , receiverObj , slot ) ;
replyType = " bool " ;
replyType = " bool " ;
@ -1629,9 +1629,9 @@ static bool isRunning(const TQCString &fName, bool printNetworkId = false)
f . close ( ) ;
f . close ( ) ;
if ( ok & & pid & & ( kill ( pid , SIGHUP ) = = 0 ) ) {
if ( ok & & pid & & ( kill ( pid , SIGHUP ) = = 0 ) ) {
if ( printNetworkId )
if ( printNetworkId )
qWarning( " %s " , contents . left ( pos ) . data ( ) ) ;
t qWarning( " %s " , contents . left ( pos ) . data ( ) ) ;
else
else
qWarning( " --------------------------------- \n "
t qWarning( " --------------------------------- \n "
" It looks like dcopserver is already running. If you are sure \n "
" It looks like dcopserver is already running. If you are sure \n "
" that it is not already running, remove %s \n "
" that it is not already running, remove %s \n "
" and start dcopserver again. \n "
" and start dcopserver again. \n "
@ -1719,8 +1719,8 @@ extern "C" DCOP_EXPORT int kdemain( int argc, char* argv[] )
if ( retcode ! = 0 )
if ( retcode ! = 0 )
{
{
qWarning( " dcopserver: Could not raise limit on number of open files. " ) ;
t qWarning( " dcopserver: Could not raise limit on number of open files. " ) ;
qWarning( " dcopserver: Current limit = %d " , cur_limit ) ;
t qWarning( " dcopserver: Current limit = %d " , cur_limit ) ;
}
}
}
}
}
}
@ -1743,7 +1743,7 @@ extern "C" DCOP_EXPORT int kdemain( int argc, char* argv[] )
if ( client . attach ( ) )
if ( client . attach ( ) )
return 0 ;
return 0 ;
}
}
qWarning( " DCOPServer self-test failed. " ) ;
t qWarning( " DCOPServer self-test failed. " ) ;
system ( findDcopserverShutdown ( ) + " --kill " ) ;
system ( findDcopserverShutdown ( ) + " --kill " ) ;
return 1 ;
return 1 ;
}
}