Revert rev. 183277:
Remove ng_rmnode_flags() function. ng_rmnode_self() was made to be called only while having node locked. When node is properly locked, any function call sent to it will always be queued. So turning ng_rmnode_self() into the ng_rmnode_flags() is not just meaningless, but incorrent, as it violates node locking when called outside. No objections: julian, thompsa
This commit is contained in:
parent
8cc9202568
commit
15cea89fab
@ -1130,7 +1130,6 @@ item_p ng_package_msg(struct ng_mesg *msg, int flags);
|
||||
item_p ng_package_msg_self(node_p here, hook_p hook, struct ng_mesg *msg);
|
||||
void ng_replace_retaddr(node_p here, item_p item, ng_ID_t retaddr);
|
||||
int ng_rmhook_self(hook_p hook); /* if a node wants to kill a hook */
|
||||
int ng_rmnode_flags(node_p here, int flags);
|
||||
int ng_rmnode_self(node_p here); /* if a node wants to suicide */
|
||||
int ng_rmtype(struct ng_type *tp);
|
||||
int ng_snd_item(item_p item, int queue);
|
||||
|
@ -1521,7 +1521,7 @@ ng_mkpeer(node_p node, const char *name, const char *name2, char *type)
|
||||
/* Shut this node down as soon as everyone is clear of it */
|
||||
/* Should add arg "immediately" to jump the queue */
|
||||
int
|
||||
ng_rmnode_flags(node_p node, int flags)
|
||||
ng_rmnode_self(node_p node)
|
||||
{
|
||||
int error;
|
||||
|
||||
@ -1531,16 +1531,10 @@ ng_rmnode_flags(node_p node, int flags)
|
||||
if (node->nd_flags & NGF_CLOSING)
|
||||
return (0);
|
||||
|
||||
error = ng_send_fn1(node, NULL, &ng_rmnode, NULL, 0, flags);
|
||||
error = ng_send_fn(node, NULL, &ng_rmnode, NULL, 0);
|
||||
return (error);
|
||||
}
|
||||
|
||||
int
|
||||
ng_rmnode_self(node_p node)
|
||||
{
|
||||
return (ng_rmnode_flags(node, NG_NOFLAGS));
|
||||
}
|
||||
|
||||
static void
|
||||
ng_rmhook_part2(node_p node, hook_p hook, void *arg1, int arg2)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user