I think it would be better to do it using a technique similar to how it is done in scheduler/client.c on line 255:
Makes sense to me - it wasn't obvious that msg_control and msg_accrights are always mutually exclusive, which is why I added a separate test... But if we're sure they are always mutally exclusive, this approach makes more sense...
Warren