MCPcopy Create free account
hub / github.com/F-Stack/f-stack / ng_address_ID

Function ng_address_ID

lib/ff_ng_base.c:3667–3687  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3665}
3666
3667int
3668ng_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)

Callers

nothing calls this directly

Calls 1

ng_ID2noderefFunction · 0.70

Tested by

no test coverage detected