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

Function ng_send_fn1

lib/ff_ng_base.c:3733–3753  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3731}
3732
3733int
3734ng_send_fn1(node_p node, hook_p hook, ng_item_fn *fn, void * arg1, int arg2,
3735 int flags)
3736{
3737 item_p item;
3738
3739 if ((item = ng_alloc_item(NGQF_FN, flags)) == NULL) {
3740 return (ENOMEM);
3741 }
3742 item->el_flags |= NGQF_WRITER;
3743 NG_NODE_REF(node); /* and one for the item */
3744 NGI_SET_NODE(item, node);
3745 if (hook) {
3746 NG_HOOK_REF(hook);
3747 NGI_SET_HOOK(item, hook);
3748 }
3749 NGI_FN(item) = fn;
3750 NGI_ARG1(item) = arg1;
3751 NGI_ARG2(item) = arg2;
3752 return(ng_snd_item(item, flags));
3753}
3754
3755/*
3756 * Send ng_item_fn2 function call to the specified node.

Callers 1

ng_send_fnFunction · 0.70

Calls 2

ng_alloc_itemFunction · 0.70
ng_snd_itemFunction · 0.70

Tested by

no test coverage detected