summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJustus Winter <4winter@informatik.uni-hamburg.de>2014-04-04 16:53:25 +0200
committerJustus Winter <4winter@informatik.uni-hamburg.de>2014-12-07 15:38:18 +0100
commitb11b002e1f08ad44273e9b139fab195e56bf6b6b (patch)
tree9387394accb309f98ae62329f4b08396c683a601
parent4191267e600e4ff1d54cf42baa2b3a0c9a842844 (diff)
console-client: make the demuxer payload-aware
* console-client/trans.c (console_demuxer): make the demuxer payload-aware.
-rw-r--r--console-client/trans.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/console-client/trans.c b/console-client/trans.c
index 67cd149d..224229e0 100644
--- a/console-client/trans.c
+++ b/console-client/trans.c
@@ -63,8 +63,16 @@ console_demuxer (mach_msg_header_t *inp,
ret = netfs_demuxer (inp, outp);
if (ret)
return ret;
-
- user = ports_lookup_port (netfs_port_bucket, inop->msgh_local_port, netfs_protid_class);
+
+ if (MACH_MSGH_BITS_LOCAL (inp->msgh_bits) ==
+ MACH_MSG_TYPE_PROTECTED_PAYLOAD)
+ user = ports_lookup_payload (netfs_port_bucket,
+ inop->msgh_protected_payload,
+ netfs_protid_class);
+ else
+ user = ports_lookup_port (netfs_port_bucket,
+ inop->msgh_local_port,
+ netfs_protid_class);
if (!user)
return ret;