summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--x11/ipc/client/ocopclient.cpp4
-rw-r--r--x11/ipc/server/ocopserver.cpp10
-rw-r--r--x11/ipc/server/ocopserver.pro1
3 files changed, 9 insertions, 6 deletions
diff --git a/x11/ipc/client/ocopclient.cpp b/x11/ipc/client/ocopclient.cpp
index ac6e4a3..c1def73 100644
--- a/x11/ipc/client/ocopclient.cpp
+++ b/x11/ipc/client/ocopclient.cpp
@@ -107,7 +107,7 @@ bool OCOPClient::isRegistered( const QCString& chan ) const{
107 OCOPPacket packe(OCOPPacket::IsRegistered, chan ); 107 OCOPPacket packe(OCOPPacket::IsRegistered, chan );
108 OCOPHead head = packe.head(); 108 OCOPHead head = packe.head();
109 write(m_socket, &head, sizeof(head) ); 109 write(m_socket, &head, sizeof(head) );
110 110 write(m_socket, chan.data(), chan.size() );
111 /* block */ 111 /* block */
112 OCOPPacket pack = packet(); 112 OCOPPacket pack = packet();
113 113
@@ -144,7 +144,7 @@ void OCOPClient::startUP() {
144 pid_t pi = fork(); 144 pid_t pi = fork();
145 if ( pi == 0 ) { 145 if ( pi == 0 ) {
146 setsid(); 146 setsid();
147 execlp("opie-ipc", "opie-ipc", NULL ); 147 execlp("ocopserver", "ocopserver", NULL );
148 _exit(1); 148 _exit(1);
149 } 149 }
150} 150}
diff --git a/x11/ipc/server/ocopserver.cpp b/x11/ipc/server/ocopserver.cpp
index e76657e..421e49c 100644
--- a/x11/ipc/server/ocopserver.cpp
+++ b/x11/ipc/server/ocopserver.cpp
@@ -134,8 +134,6 @@ int OCopServer::accept() {
134 return ::accept( m_serverfd, (struct sockaddr*)&m_address, &m_adrlaenge ); 134 return ::accept( m_serverfd, (struct sockaddr*)&m_address, &m_adrlaenge );
135} 135}
136void OCopServer::newOnClient( int fd ) { 136void OCopServer::newOnClient( int fd ) {
137 int bug[4096];
138 //qWarning("new stuff for client on fd %d", fd );
139 errno = 0; 137 errno = 0;
140 OCOPHead head; 138 OCOPHead head;
141 memset(&head, 0, sizeof(head) ); 139 memset(&head, 0, sizeof(head) );
@@ -153,7 +151,7 @@ void OCopServer::newOnClient( int fd ) {
153 /* 151 /*
154 * OCOPHead 152 * OCOPHead
155 */ 153 */
156 qWarning("data %s %d", bug, rea ); 154 //qWarning("data %s %d", &bug, rea );
157 155
158 /* 156 /*
159 * Check the magic 157 * Check the magic
@@ -174,9 +172,11 @@ void OCopServer::newOnClient( int fd ) {
174 /* 172 /*
175 * we do not check for errors 173 * we do not check for errors
176 */ 174 */
175 qWarning("read ");
177 int s = read(fd, channel.data(), head.chlen ); 176 int s = read(fd, channel.data(), head.chlen );
178 s = read(fd, func.data(), head.funclen ); 177 s = read(fd, func.data(), head.funclen );
179 s = read(fd, data.data(), head.datalen ); 178 s = read(fd, data.data(), head.datalen );
179 qWarning("read");
180 180
181 /* debug output */ 181 /* debug output */
182 qWarning("channel %s %d", channel.data(), head.chlen ); 182 qWarning("channel %s %d", channel.data(), head.chlen );
@@ -285,6 +285,7 @@ void OCopServer::dispatch( const OCOPPacket& packet, int sourceFD ) {
285 case OCOPPacket::Signal: 285 case OCOPPacket::Signal:
286 break; 286 break;
287 case OCOPPacket::IsRegistered: 287 case OCOPPacket::IsRegistered:
288 qWarning("IsRegistered");
288 isRegistered( packet.channel(), sourceFD ); 289 isRegistered( packet.channel(), sourceFD );
289 break; 290 break;
290 }; 291 };
@@ -340,6 +341,7 @@ void OCopServer::delChannel( const QCString& channel,
340 } 341 }
341} 342}
342void OCopServer::isRegistered( const QCString& channel, int fd) { 343void OCopServer::isRegistered( const QCString& channel, int fd) {
344 qWarning("isRegistered");
343 OCOPHead head; 345 OCOPHead head;
344 QCString func(2); 346 QCString func(2);
345 347
@@ -369,7 +371,7 @@ void OCopServer::isRegistered( const QCString& channel, int fd) {
369QValueList<int> OCopServer::clients( const QCString& channel ) { 371QValueList<int> OCopServer::clients( const QCString& channel ) {
370 return m_channels[channel]; 372 return m_channels[channel];
371} 373}
372void OCopServer::call( const OCOPPacket& p, int fd ) { 374void OCopServer::call( const OCOPPacket& p, int ) {
373 QValueList<int> cli = clients( p.channel() ); 375 QValueList<int> cli = clients( p.channel() );
374 QValueList<int>::Iterator it; 376 QValueList<int>::Iterator it;
375 377
diff --git a/x11/ipc/server/ocopserver.pro b/x11/ipc/server/ocopserver.pro
index 1776063..e0a928c 100644
--- a/x11/ipc/server/ocopserver.pro
+++ b/x11/ipc/server/ocopserver.pro
@@ -1,4 +1,5 @@
1 TEMPLATE= app 1 TEMPLATE= app
2DESTDIR = $(OPIEDIR)/bin
2 CONFIG = qt warn_on debug 3 CONFIG = qt warn_on debug
3 #CONFIG = qt warn_on release 4 #CONFIG = qt warn_on release
4 HEADERS = ../common/ocoppacket.h ocopclient.h ocopserver.h 5 HEADERS = ../common/ocoppacket.h ocopclient.h ocopserver.h