author | zecke <zecke> | 2002-10-16 16:53:43 (UTC) |
---|---|---|
committer | zecke <zecke> | 2002-10-16 16:53:43 (UTC) |
commit | ef5700ad4eda47e98b76467fa80dd6cd838c6391 (patch) (unidiff) | |
tree | dcd5d051824689cab42f036895959483fb5e690b /x11/ipc/client/ocopclient.cpp | |
parent | ea11ae7dc31e23578d13f30315a3697cbce99c05 (diff) | |
download | opie-ef5700ad4eda47e98b76467fa80dd6cd838c6391.zip opie-ef5700ad4eda47e98b76467fa80dd6cd838c6391.tar.gz opie-ef5700ad4eda47e98b76467fa80dd6cd838c6391.tar.bz2 |
some debug output
+ bugfix
besides some problems with the server IPC is working on X11
too
-rw-r--r-- | x11/ipc/client/ocopclient.cpp | 4 |
1 files changed, 2 insertions, 2 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 | |||
@@ -98,25 +98,25 @@ OCOPPacket OCOPClient::packet() const{ | |||
98 | return pack; | 98 | return pack; |
99 | } | 99 | } |
100 | /* | 100 | /* |
101 | * we've blocking IO here on these sockets | 101 | * we've blocking IO here on these sockets |
102 | * so we send and go on read | 102 | * so we send and go on read |
103 | * this will be blocked | 103 | * this will be blocked |
104 | */ | 104 | */ |
105 | bool OCOPClient::isRegistered( const QCString& chan ) const{ | 105 | bool OCOPClient::isRegistered( const QCString& chan ) const{ |
106 | /* should I disconnect the socket notfier? */ | 106 | /* should I disconnect the socket notfier? */ |
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 | ||
114 | /* connect here again */ | 114 | /* connect here again */ |
115 | if ( pack.channel() == chan ) { | 115 | if ( pack.channel() == chan ) { |
116 | QCString func = pack.header(); | 116 | QCString func = pack.header(); |
117 | if (func[0] == 1 ) | 117 | if (func[0] == 1 ) |
118 | return true; | 118 | return true; |
119 | } | 119 | } |
120 | 120 | ||
121 | return false; | 121 | return false; |
122 | }; | 122 | }; |
@@ -135,16 +135,16 @@ void OCOPClient::delChannel(const QCString& chan ) { | |||
135 | void OCOPClient::call( const OCOPPacket& pack ) { | 135 | void OCOPClient::call( const OCOPPacket& pack ) { |
136 | OCOPHead head = pack.head(); | 136 | OCOPHead head = pack.head(); |
137 | write(m_socket, &head, sizeof(head) ); | 137 | write(m_socket, &head, sizeof(head) ); |
138 | write(m_socket, pack.channel().data(), pack.channel().size() ); | 138 | write(m_socket, pack.channel().data(), pack.channel().size() ); |
139 | write(m_socket, pack.header().data(), pack.header().size() ); | 139 | write(m_socket, pack.header().data(), pack.header().size() ); |
140 | write(m_socket, pack.content().data(), pack.content().size() ); | 140 | write(m_socket, pack.content().data(), pack.content().size() ); |
141 | } | 141 | } |
142 | void OCOPClient::startUP() { | 142 | void OCOPClient::startUP() { |
143 | qWarning("Start me up"); | 143 | qWarning("Start me up"); |
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 | } |