diff options
author | Justus Winter <4winter@informatik.uni-hamburg.de> | 2013-12-11 12:51:10 +0100 |
---|---|---|
committer | Justus Winter <4winter@informatik.uni-hamburg.de> | 2013-12-16 10:48:18 +0100 |
commit | d999b70a3f395afe06d430c14fdf02a64ac28c06 (patch) | |
tree | d923b4f70602faa25521258d25bcc388e8bcee68 /utils/rpctrace.c | |
parent | ae04256ee85fa02288f34587faad5d461ad57186 (diff) |
utils/rpctrace: generalize code in rewrite_right
* utils/rpctrace.c (rewrite_right): Generalize the code so we can use
rewrite_right to rewrite MACH_MSG_TYPE_PORT_SEND rights for non-rpc ports.
Diffstat (limited to 'utils/rpctrace.c')
-rw-r--r-- | utils/rpctrace.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/utils/rpctrace.c b/utils/rpctrace.c index ef7ab536..9433ef38 100644 --- a/utils/rpctrace.c +++ b/utils/rpctrace.c @@ -727,8 +727,6 @@ rewrite_right (mach_port_t *right, mach_msg_type_name_t *type, * has the receive right, we move the send right of the traced port to * the destination; otherwise, we move the one of the send wrapper. */ - assert (req); - /* See if this is already one of our own wrapper ports. */ send_wrapper = ports_lookup_port (traced_bucket, *right, 0); if (send_wrapper) @@ -760,7 +758,7 @@ rewrite_right (mach_port_t *right, mach_msg_type_name_t *type, return TRACED_INFO (send_wrapper)->name; } - if (req->req_id == 3216) /* mach_port_extract_right */ + if (req && req->req_id == 3216) /* mach_port_extract_right */ receiver_info = discover_receive_right (*right, dest); else receiver_info = discover_receive_right (*right, source); |