summaryrefslogtreecommitdiff
path: root/utils/rpctrace.c
diff options
context:
space:
mode:
authorRoland McGrath <roland@gnu.org>2001-10-15 04:49:33 +0000
committerRoland McGrath <roland@gnu.org>2001-10-15 04:49:33 +0000
commit7d5f324f3f694f9ac7044bcabc0f16eec1f73278 (patch)
tree71489e073db8150a36bbee8f3383f75353b1ec81 /utils/rpctrace.c
parentf6e2b11d1f178ab8e2299df660807232f07f559d (diff)
2001-10-14 Roland McGrath <roland@frob.com>
* rpctrace.c (trace_and_forward): Move assert on expected port type to after check for notifications (which always use fake send-once rights).
Diffstat (limited to 'utils/rpctrace.c')
-rw-r--r--utils/rpctrace.c5
1 files changed, 4 insertions, 1 deletions
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. */