| 3665 | } |
| 3666 | |
| 3667 | int |
| 3668 | ng_address_ID(node_p here, item_p item, ng_ID_t ID, ng_ID_t retaddr) |
| 3669 | { |
| 3670 | node_p dest; |
| 3671 | |
| 3672 | ITEM_DEBUG_CHECKS; |
| 3673 | /* |
| 3674 | * Find the target node. |
| 3675 | */ |
| 3676 | dest = ng_ID2noderef(ID); /* GETS REFERENCE! */ |
| 3677 | if (dest == NULL) { |
| 3678 | NG_FREE_ITEM(item); |
| 3679 | TRAP_ERROR(); |
| 3680 | return(EINVAL); |
| 3681 | } |
| 3682 | /* Fill out the contents */ |
| 3683 | NGI_SET_NODE(item, dest); |
| 3684 | NGI_CLR_HOOK(item); |
| 3685 | SET_RETADDR(item, here, retaddr); |
| 3686 | return (0); |
| 3687 | } |
| 3688 | |
| 3689 | /* |
| 3690 | * special case to send a message to self (e.g. destroy node) |
nothing calls this directly
no test coverage detected