diff options
Diffstat (limited to 'net/tipc/node_subscr.c')
| -rw-r--r-- | net/tipc/node_subscr.c | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/net/tipc/node_subscr.c b/net/tipc/node_subscr.c index 018a55332d91..c3c2815ae630 100644 --- a/net/tipc/node_subscr.c +++ b/net/tipc/node_subscr.c | |||
| @@ -2,7 +2,7 @@ | |||
| 2 | * net/tipc/node_subscr.c: TIPC "node down" subscription handling | 2 | * net/tipc/node_subscr.c: TIPC "node down" subscription handling |
| 3 | * | 3 | * |
| 4 | * Copyright (c) 1995-2006, Ericsson AB | 4 | * Copyright (c) 1995-2006, Ericsson AB |
| 5 | * Copyright (c) 2005, Wind River Systems | 5 | * Copyright (c) 2005, 2010-2011, Wind River Systems |
| 6 | * All rights reserved. | 6 | * All rights reserved. |
| 7 | * | 7 | * |
| 8 | * Redistribution and use in source and binary forms, with or without | 8 | * Redistribution and use in source and binary forms, with or without |
| @@ -76,3 +76,22 @@ void tipc_nodesub_unsubscribe(struct tipc_node_subscr *node_sub) | |||
| 76 | list_del_init(&node_sub->nodesub_list); | 76 | list_del_init(&node_sub->nodesub_list); |
| 77 | tipc_node_unlock(node_sub->node); | 77 | tipc_node_unlock(node_sub->node); |
| 78 | } | 78 | } |
| 79 | |||
| 80 | /** | ||
| 81 | * tipc_nodesub_notify - notify subscribers that a node is unreachable | ||
| 82 | * | ||
| 83 | * Note: node is locked by caller | ||
| 84 | */ | ||
| 85 | |||
| 86 | void tipc_nodesub_notify(struct tipc_node *node) | ||
| 87 | { | ||
| 88 | struct tipc_node_subscr *ns; | ||
| 89 | |||
| 90 | list_for_each_entry(ns, &node->nsub, nodesub_list) { | ||
| 91 | if (ns->handle_node_down) { | ||
| 92 | tipc_k_signal((Handler)ns->handle_node_down, | ||
| 93 | (unsigned long)ns->usr_handle); | ||
| 94 | ns->handle_node_down = NULL; | ||
| 95 | } | ||
| 96 | } | ||
| 97 | } | ||
