diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/process.c | 21 |
1 files changed, 19 insertions, 2 deletions
diff --git a/src/process.c b/src/process.c index a6823e9..2a97dcb 100644 --- a/src/process.c +++ b/src/process.c @@ -250,16 +250,33 @@ Bool *replyReadyRet; _IceAddReplyWait (iceConn, replyWait); - /* * Note that there are two different replyWaits. The first is * the one passed into IceProcessMessages, and is the replyWait * for the message the client is blocking on. The second is * the replyWait for the message currently being processed * by IceProcessMessages. We call it "useThisReplyWait". + * + * Also, when two hosts communicate over an ICE connection and use + * different major opcodes for a subprotocol, it is impossible + * to use message replies unless we translate opcodes before + * comparing them. */ + + { + int op; - useThisReplyWait = _IceSearchReplyWaits (iceConn, header->majorOpcode); + if (header->majorOpcode == 0) + { + op = 0; + } + else + { + int idx = header->majorOpcode - iceConn->his_min_opcode; + op = iceConn->process_msg_info[idx].my_opcode; + } + useThisReplyWait = _IceSearchReplyWaits (iceConn, op); + } } if (header->majorOpcode == 0) |