summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
7a488fd)
Simplifies TIPC's network topology service so that it no longer registers
its ports with the user registry, since the service doesn't take advantage
of any of the registry's capabilities.
Signed-off-by: Allan Stephens <Allan.Stephens@windriver.com>
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
#include "core.h"
#include "name_table.h"
#include "core.h"
#include "name_table.h"
u32 setup_port;
atomic_t subscription_count;
struct list_head subscriber_list;
u32 setup_port;
atomic_t subscription_count;
struct list_head subscriber_list;
/* Create server port & establish connection to subscriber */
/* Create server port & establish connection to subscriber */
- tipc_createport(topsrv.user_ref,
subscriber,
importance,
NULL,
subscriber,
importance,
NULL,
INIT_LIST_HEAD(&topsrv.subscriber_list);
spin_lock_bh(&topsrv.lock);
INIT_LIST_HEAD(&topsrv.subscriber_list);
spin_lock_bh(&topsrv.lock);
- res = tipc_attach(&topsrv.user_ref);
- if (res) {
- spin_unlock_bh(&topsrv.lock);
- return res;
- }
-
- res = tipc_createport(topsrv.user_ref,
+ res = tipc_createport(0,
NULL,
TIPC_CRITICAL_IMPORTANCE,
NULL,
NULL,
TIPC_CRITICAL_IMPORTANCE,
NULL,
goto failed;
res = tipc_nametbl_publish_rsv(topsrv.setup_port, TIPC_NODE_SCOPE, &seq);
goto failed;
res = tipc_nametbl_publish_rsv(topsrv.setup_port, TIPC_NODE_SCOPE, &seq);
+ if (res) {
+ tipc_deleteport(topsrv.setup_port);
+ topsrv.setup_port = 0;
spin_unlock_bh(&topsrv.lock);
return 0;
failed:
err("Failed to create subscription service\n");
spin_unlock_bh(&topsrv.lock);
return 0;
failed:
err("Failed to create subscription service\n");
- tipc_detach(topsrv.user_ref);
- topsrv.user_ref = 0;
spin_unlock_bh(&topsrv.lock);
return res;
}
spin_unlock_bh(&topsrv.lock);
return res;
}
struct subscriber *subscriber_temp;
spinlock_t *subscriber_lock;
struct subscriber *subscriber_temp;
spinlock_t *subscriber_lock;
+ if (topsrv.setup_port) {
tipc_deleteport(topsrv.setup_port);
tipc_deleteport(topsrv.setup_port);
+ topsrv.setup_port = 0;
+
list_for_each_entry_safe(subscriber, subscriber_temp,
&topsrv.subscriber_list,
subscriber_list) {
list_for_each_entry_safe(subscriber, subscriber_temp,
&topsrv.subscriber_list,
subscriber_list) {
subscr_terminate(subscriber);
spin_unlock_bh(subscriber_lock);
}
subscr_terminate(subscriber);
spin_unlock_bh(subscriber_lock);
}
- tipc_detach(topsrv.user_ref);
- topsrv.user_ref = 0;