summaryrefslogtreecommitdiff
path: root/x11/ipc/server
Side-by-side diff
Diffstat (limited to 'x11/ipc/server') (more/less context) (ignore whitespace changes)
-rw-r--r--x11/ipc/server/ocopserver.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/x11/ipc/server/ocopserver.cpp b/x11/ipc/server/ocopserver.cpp
index 0f818b7..ee5ea18 100644
--- a/x11/ipc/server/ocopserver.cpp
+++ b/x11/ipc/server/ocopserver.cpp
@@ -166,9 +166,9 @@ void OCopServer::newOnClient( int fd ) {
if (head.magic == 47 ) {
// qWarning("magic match");
QCString channel( head.chlen+1 );
QCString func( head.funclen+1 );
- QByteArray data ( head.datalen );
+ QByteArray data ( head.datalen+1 );
/*
* we do not check for errors
*/
@@ -299,9 +299,9 @@ void OCopServer::dispatch( const OCOPPacket& packet, int sourceFD ) {
/* not implemented :( */
case OCOPPacket::Signal:
break;
case OCOPPacket::IsRegistered:
- qWarning("IsRegistered");
+ qWarning("Server:IsRegistered %s", packet.channel().data() );
isRegistered( packet.channel(), sourceFD );
break;
};
}
@@ -364,9 +364,9 @@ void OCopServer::delChannel( const QCString& channel,
qWarning(" channel count is now %d", ints.count() );
}
}
void OCopServer::isRegistered( const QCString& channel, int fd) {
-// qWarning("isRegistered");
+ qWarning("Server:isRegistered %s", channel.data() );
OCOPHead head;
QCString func(2);
memset(&head, 0, sizeof(head ) );
@@ -378,10 +378,12 @@ void OCopServer::isRegistered( const QCString& channel, int fd) {
if ( isChannelRegistered( channel ) ) {
//is registered
func[0] = 1;
+ qWarning("Server:Channel is Registered %d", head.chlen);
}else{
func[0] = 0;
+ qWarning("Server:Channel is NotRegistered");
}
/**
* write the head
@@ -400,8 +402,9 @@ void OCopServer::call( const OCOPPacket& p, int ) {
QValueList<int>::Iterator it;
OCOPHead head = p.head();
for (it = cli.begin(); it != cli.end(); ++it ) {
+ qWarning("Server:calling %d %s %s", (*it), p.channel().data(), p.header().data() );
write( (*it), &head, sizeof(head ) );
/* expl. shared! */
write( (*it), p.channel().data(), p.channel().size() );
write( (*it), p.header().data(), p.header().size() );