[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-core-devel
Subject:    Re: KDE does not start on FreeBSD
From:       Waldo Bastian <bastian () kde ! org>
Date:       2002-01-09 0:15:21
[Download RAW message or body]

On Tuesday 08 January 2002 01:56 pm, Lauri Watts wrote:
> On Tuesday 08 January 2002 21.50, Waldo Bastian wrote:
> > On Tuesday 08 January 2002 11:51 am, Lauri Watts wrote:
> > > I applied the patch, and result is attached.
> >
> > Great.. seems my debug stuff managed to miss the interesting parts... new
> > patch attached, please repeat :-] Sorry about that.
>
> Well, this one looks more promising.. or at least, a whole lot more verbose
> :)

Interesting.. I think I found a bug. But the fact that it gets triggered means 
that there is something else wrong as well.

This time a patch for dcopclient.cpp (it should go on top of the other 
patch).. can you send me the output of "testdcop" as well?

Cheers,
Waldo
["dcopclient_debug.patch" (text/x-diff)]

Index: dcopclient.cpp
===================================================================
RCS file: /home/kde/kdelibs/dcop/dcopclient.cpp,v
retrieving revision 1.137
diff -u -r1.137 dcopclient.cpp
--- dcopclient.cpp	2002/01/07 05:34:01	1.137
+++ dcopclient.cpp	2002/01/09 00:14:58
@@ -34,6 +34,7 @@
 #include <sys/types.h>
 #include <sys/stat.h>
 #include <sys/file.h>
+#include <sys/socket.h>
 
 #include <ctype.h>
 #include <unistd.h>
@@ -352,7 +353,7 @@
  */
 void DCOPProcessInternal( DCOPClientPrivate *d, int opcode, CARD32 key, const \
QByteArray& dataReceived, bool canPost  )  {
-    if (!d->accept_calls && (opcode == DCOPFind))
+    if (!d->accept_calls && (opcode != DCOPCall))
         return;
 
     IceConn iceConn = d->iceConn;
@@ -369,6 +370,7 @@
         QDataStream replyStream( reply, IO_WriteOnly );
 	// Call rejected.
 	replyStream << d->appId << fromApp;
+qWarning("%s: Sending DCOPReplyFailed (not accepting calls) opcode = %d sending to \
'%s'", d->appId.data(), opcode, fromApp.data());  IceGetHeader( iceConn, \
d->majorOpcode, DCOPReplyFailed,  sizeof(DCOPMsg), DCOPMsg, pMsg );
 	int datalen = reply.size();
@@ -424,6 +426,7 @@
 	// Call delayed. Send back the transaction ID.
 	replyStream << d->appId << fromApp << id;
 
+qWarning("%s: Sending DCOPReplyWait opcode = %d sending to '%s'", d->appId.data(), \
opcode, fromApp.data());  IceGetHeader( iceConn, d->majorOpcode, DCOPReplyWait,
 		      sizeof(DCOPMsg), DCOPMsg, pMsg );
 	pMsg->key = key;
@@ -438,6 +441,7 @@
 	// Call failed. No data send back.
 
 	replyStream << d->appId << fromApp;
+qWarning("%s: Sending DCOPReplyFailed opcode = %d sending to '%s'", d->appId.data(), \
opcode, fromApp.data());  IceGetHeader( iceConn, d->majorOpcode, DCOPReplyFailed,
 		      sizeof(DCOPMsg), DCOPMsg, pMsg );
 	int datalen = reply.size();
@@ -450,6 +454,8 @@
     // Call successfull. Send back replyType and replyData.
     replyStream << d->appId << fromApp << replyType << replyData.size();
 
+
+qWarning("%s: Sending DCOPReply opcode = %d sending to '%s'", d->appId.data(), \
opcode, fromApp.data());  // we are calling, so we need to set up reply data
     IceGetHeader( iceConn, d->majorOpcode, DCOPReply,
 		  sizeof(DCOPMsg), DCOPMsg, pMsg );
@@ -717,10 +723,13 @@
     }
 
 #ifdef SO_PEERCRED
+qWarning("DCOClient: We have SO_PEERCRED");
     d->foreign_server = !peerIsUs(socket());
 #else
+qWarning("DCOPClient: We do NOT have SO_PEERCRED");
     d->foreign_server = !isServerSocketOwnedByUser(d->serverAddr);
 #endif
+qWarning("DCOPClient: Foreign server = %s", d->foreign_server ? "true" : "false");
     if (!d->accept_calls_override)
        d->accept_calls = !d->foreign_server;
 
@@ -1691,6 +1700,7 @@
     QByteArray ba;
     QDataStream ds(ba, IO_WriteOnly);
     ds << d->appId << trans->senderId << trans->id << replyType << replyData;
+qWarning("%s: Sending DCOPReplyDelayed sending to '%s'", d->appId.data(), \
trans->senderId.data());  
     IceGetHeader(d->iceConn, d->majorOpcode, DCOPReplyDelayed,
 		 sizeof(DCOPMsg), DCOPMsg, pMsg);



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic