summaryrefslogtreecommitdiff
path: root/libports
diff options
context:
space:
mode:
authorJustus Winter <justus@gnupg.org>2016-02-23 23:35:30 +0100
committerJustus Winter <justus@gnupg.org>2016-02-23 23:35:30 +0100
commit5512308e4176303b25d52350c3c48dc37c3c665d (patch)
tree1621f1c6317f367994679aa1b7e3518722e8eaab /libports
parent59b9cf8f46fb5a186fafe08b2086913cf1b00188 (diff)
libports: preserve the complex message flag
* libports/manage-multithread.c (internal_demuxer): Preserve all message flags when we store the objects address as payload in the message. * libports/manage-one-thread.c (internal_demuxer): Likewise.
Diffstat (limited to 'libports')
-rw-r--r--libports/manage-multithread.c7
-rw-r--r--libports/manage-one-thread.c7
2 files changed, 8 insertions, 6 deletions
diff --git a/libports/manage-multithread.c b/libports/manage-multithread.c
index 60743d93..1588f632 100644
--- a/libports/manage-multithread.c
+++ b/libports/manage-multithread.c
@@ -180,9 +180,10 @@ ports_manage_port_operations_multithread (struct port_bucket *bucket,
having to do another hash table lookup in the intran
functions if protected payloads are not supported by
the kernel. */
- inp->msgh_bits = MACH_MSGH_BITS (
- MACH_MSGH_BITS_REMOTE (inp->msgh_bits),
- MACH_MSG_TYPE_PROTECTED_PAYLOAD);
+ inp->msgh_bits =
+ MACH_MSGH_BITS_OTHER (inp->msgh_bits)
+ | MACH_MSGH_BITS (MACH_MSGH_BITS_REMOTE (inp->msgh_bits),
+ MACH_MSG_TYPE_PROTECTED_PAYLOAD);
inp->msgh_protected_payload = (unsigned long) pi;
}
}
diff --git a/libports/manage-one-thread.c b/libports/manage-one-thread.c
index b920338f..313838cb 100644
--- a/libports/manage-one-thread.c
+++ b/libports/manage-one-thread.c
@@ -71,9 +71,10 @@ ports_manage_port_operations_one_thread (struct port_bucket *bucket,
having to do another hash table lookup in the intran
functions if protected payloads are not supported by
the kernel. */
- inp->msgh_bits = MACH_MSGH_BITS (
- MACH_MSGH_BITS_REMOTE (inp->msgh_bits),
- MACH_MSG_TYPE_PROTECTED_PAYLOAD);
+ inp->msgh_bits =
+ MACH_MSGH_BITS_OTHER (inp->msgh_bits)
+ | MACH_MSGH_BITS (MACH_MSGH_BITS_REMOTE (inp->msgh_bits),
+ MACH_MSG_TYPE_PROTECTED_PAYLOAD);
inp->msgh_protected_payload = (unsigned long) pi;
}
}