From 7d5f324f3f694f9ac7044bcabc0f16eec1f73278 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Mon, 15 Oct 2001 04:49:33 +0000 Subject: 2001-10-14 Roland McGrath * rpctrace.c (trace_and_forward): Move assert on expected port type to after check for notifications (which always use fake send-once rights). --- utils/rpctrace.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/utils/rpctrace.c b/utils/rpctrace.c index 450e4246..003e23e9 100644 --- a/utils/rpctrace.c +++ b/utils/rpctrace.c @@ -519,8 +519,9 @@ trace_and_forward (mach_msg_header_t *inp, mach_msg_header_t *outp) ports (traced_class). */ info = ports_lookup_port (traced_bucket, inp->msgh_local_port, 0); assert (info); - assert (MACH_MSGH_BITS_LOCAL (inp->msgh_bits) == info->type); + /* A notification message from the kernel appears to have been sent + with a send-once right, even if there have never really been any. */ if (MACH_MSGH_BITS_LOCAL (inp->msgh_bits) == MACH_MSG_TYPE_MOVE_SEND_ONCE) { if (inp->msgh_id == MACH_NOTIFY_DEAD_NAME) @@ -552,6 +553,8 @@ trace_and_forward (mach_msg_header_t *inp, mach_msg_header_t *outp) } } + assert (MACH_MSGH_BITS_LOCAL (inp->msgh_bits) == info->type); + complex = inp->msgh_bits & MACH_MSGH_BITS_COMPLEX; /* Swap the header data like a crossover cable. */ -- cgit v1.2.3