diff options
author | Jon Maloy <jon.maloy@ericsson.com> | 2018-02-15 04:40:47 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2018-02-16 15:26:34 -0500 |
commit | 242e82cc95f6b4e83e1771f9915edcb2a63708e1 (patch) | |
tree | 00821f92cfc58231f4054d27fe5297b7f36a8836 /net/tipc/server.c | |
parent | 8985ecc7c1e07c42acc1e44ac56fa224f8a5c62f (diff) |
tipc: collapse subscription creation functions
After the previous changes it becomes logical to collapse the two-level
creation of subscription instances into one. We do that here.
We also rename the creation and deletion functions for more consistency.
Acked-by: Ying Xue <ying.xue@windriver.com>
Signed-off-by: Jon Maloy <jon.maloy@ericsson.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/tipc/server.c')
-rw-r--r-- | net/tipc/server.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/net/tipc/server.c b/net/tipc/server.c index 5d231fa8e4b5..6a18b10ac271 100644 --- a/net/tipc/server.c +++ b/net/tipc/server.c | |||
@@ -203,7 +203,7 @@ static void tipc_con_delete_sub(struct tipc_conn *con, struct tipc_subscr *s) | |||
203 | spin_lock_bh(&con->sub_lock); | 203 | spin_lock_bh(&con->sub_lock); |
204 | list_for_each_entry_safe(sub, tmp, sub_list, subscrp_list) { | 204 | list_for_each_entry_safe(sub, tmp, sub_list, subscrp_list) { |
205 | if (!s || !memcmp(s, &sub->evt.s, sizeof(*s))) | 205 | if (!s || !memcmp(s, &sub->evt.s, sizeof(*s))) |
206 | tipc_sub_delete(sub); | 206 | tipc_sub_unsubscribe(sub); |
207 | else if (s) | 207 | else if (s) |
208 | break; | 208 | break; |
209 | } | 209 | } |
@@ -278,7 +278,7 @@ static int tipc_con_rcv_sub(struct tipc_server *srv, | |||
278 | tipc_con_delete_sub(con, s); | 278 | tipc_con_delete_sub(con, s); |
279 | return 0; | 279 | return 0; |
280 | } | 280 | } |
281 | sub = tipc_subscrp_subscribe(srv, s, con->conid); | 281 | sub = tipc_sub_subscribe(srv, s, con->conid); |
282 | if (!sub) | 282 | if (!sub) |
283 | return -1; | 283 | return -1; |
284 | 284 | ||