author | zecke <zecke> | 2002-10-01 18:04:40 (UTC) |
---|---|---|
committer | zecke <zecke> | 2002-10-01 18:04:40 (UTC) |
commit | de95e9ad55685630512a8ee67d6e9214af1b1071 (patch) (side-by-side diff) | |
tree | a2f62044d8ba48aab1ca3f74376358f5aef352b3 /x11/ipc/server/ocopserver.cpp | |
parent | 1d9e6c252f74bfc8fcf6c80d8ce2a80cbd566d26 (diff) | |
download | opie-de95e9ad55685630512a8ee67d6e9214af1b1071.zip opie-de95e9ad55685630512a8ee67d6e9214af1b1071.tar.gz opie-de95e9ad55685630512a8ee67d6e9214af1b1071.tar.bz2 |
The client should be working
it's complete but I never compiled it
Diffstat (limited to 'x11/ipc/server/ocopserver.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | x11/ipc/server/ocopserver.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/x11/ipc/server/ocopserver.cpp b/x11/ipc/server/ocopserver.cpp index 3df574b..e76657e 100644 --- a/x11/ipc/server/ocopserver.cpp +++ b/x11/ipc/server/ocopserver.cpp @@ -331,53 +331,54 @@ void OCopServer::delChannel( const QCString& channel, QValueList<int> ints = it.data(); if ( ints.count() == 1 ) m_channels.remove( it ); else{ QValueList<int> ints = it.data(); ints.remove( fd ); m_channels.replace( it.key(), ints ); } } } void OCopServer::isRegistered( const QCString& channel, int fd) { OCOPHead head; QCString func(2); memset(&head, 0, sizeof(head ) ); head.magic = 47; head.type = OCOPPacket::IsRegistered; head.chlen = channel.size(); head.funclen = func.size(); head.datalen = 0; if ( isChannelRegistered( channel ) ) { //is registered func[0] = 1; }else{ func[0] = 0; } /** * write the head * and then channel * success/failure inside func */ write(fd, &head, sizeof(head) ); write(fd, channel.data(), channel.size() ); write(fd, func.data(), func.size() ); } QValueList<int> OCopServer::clients( const QCString& channel ) { return m_channels[channel]; } void OCopServer::call( const OCOPPacket& p, int fd ) { QValueList<int> cli = clients( p.channel() ); QValueList<int>::Iterator it; OCOPHead head = p.head(); for (it = cli.begin(); it != cli.end(); ++it ) { write( (*it), &head, sizeof(head ) ); + /* expl. shared! */ write( (*it), p.channel().data(), p.channel().size() ); write( (*it), p.header().data(), p.header().size() ); write( (*it), p.content().data(), p.content().size() ); }; } |