diff options
Diffstat (limited to 'net/tipc/subscr.c')
-rw-r--r-- | net/tipc/subscr.c | 27 |
1 files changed, 6 insertions, 21 deletions
diff --git a/net/tipc/subscr.c b/net/tipc/subscr.c index eaef826fc06d..b86fbbf7a0b9 100644 --- a/net/tipc/subscr.c +++ b/net/tipc/subscr.c | |||
@@ -220,7 +220,7 @@ static void tipc_subscrb_subscrp_delete(struct tipc_subscriber *subscriber, | |||
220 | spin_unlock_bh(&subscriber->lock); | 220 | spin_unlock_bh(&subscriber->lock); |
221 | } | 221 | } |
222 | 222 | ||
223 | static struct tipc_subscriber *tipc_subscrb_create(int conid) | 223 | struct tipc_subscriber *tipc_subscrb_create(int conid) |
224 | { | 224 | { |
225 | struct tipc_subscriber *subscriber; | 225 | struct tipc_subscriber *subscriber; |
226 | 226 | ||
@@ -237,7 +237,7 @@ static struct tipc_subscriber *tipc_subscrb_create(int conid) | |||
237 | return subscriber; | 237 | return subscriber; |
238 | } | 238 | } |
239 | 239 | ||
240 | static void tipc_subscrb_delete(struct tipc_subscriber *subscriber) | 240 | void tipc_subscrb_delete(struct tipc_subscriber *subscriber) |
241 | { | 241 | { |
242 | tipc_subscrb_subscrp_delete(subscriber, NULL); | 242 | tipc_subscrb_subscrp_delete(subscriber, NULL); |
243 | tipc_subscrb_put(subscriber); | 243 | tipc_subscrb_put(subscriber); |
@@ -315,16 +315,10 @@ static int tipc_subscrp_subscribe(struct net *net, struct tipc_subscr *s, | |||
315 | return 0; | 315 | return 0; |
316 | } | 316 | } |
317 | 317 | ||
318 | /* Handle one termination request for the subscriber */ | 318 | /* Handle one request to create a new subscription for the subscriber |
319 | static void tipc_subscrb_release_cb(int conid, void *usr_data) | 319 | */ |
320 | { | 320 | int tipc_subscrb_rcv(struct net *net, int conid, void *usr_data, |
321 | tipc_subscrb_delete((struct tipc_subscriber *)usr_data); | 321 | void *buf, size_t len) |
322 | } | ||
323 | |||
324 | /* Handle one request to create a new subscription for the subscriber */ | ||
325 | static int tipc_subscrb_rcv_cb(struct net *net, int conid, | ||
326 | struct sockaddr_tipc *addr, void *usr_data, | ||
327 | void *buf, size_t len) | ||
328 | { | 322 | { |
329 | struct tipc_subscriber *subscriber = usr_data; | 323 | struct tipc_subscriber *subscriber = usr_data; |
330 | struct tipc_subscr *s = (struct tipc_subscr *)buf; | 324 | struct tipc_subscr *s = (struct tipc_subscr *)buf; |
@@ -345,12 +339,6 @@ static int tipc_subscrb_rcv_cb(struct net *net, int conid, | |||
345 | return tipc_subscrp_subscribe(net, s, subscriber, swap, status); | 339 | return tipc_subscrp_subscribe(net, s, subscriber, swap, status); |
346 | } | 340 | } |
347 | 341 | ||
348 | /* Handle one request to establish a new subscriber */ | ||
349 | static void *tipc_subscrb_connect_cb(int conid) | ||
350 | { | ||
351 | return (void *)tipc_subscrb_create(conid); | ||
352 | } | ||
353 | |||
354 | int tipc_topsrv_start(struct net *net) | 342 | int tipc_topsrv_start(struct net *net) |
355 | { | 343 | { |
356 | struct tipc_net *tn = net_generic(net, tipc_net_id); | 344 | struct tipc_net *tn = net_generic(net, tipc_net_id); |
@@ -376,9 +364,6 @@ int tipc_topsrv_start(struct net *net) | |||
376 | topsrv->net = net; | 364 | topsrv->net = net; |
377 | topsrv->saddr = saddr; | 365 | topsrv->saddr = saddr; |
378 | topsrv->max_rcvbuf_size = sizeof(struct tipc_subscr); | 366 | topsrv->max_rcvbuf_size = sizeof(struct tipc_subscr); |
379 | topsrv->tipc_conn_recvmsg = tipc_subscrb_rcv_cb; | ||
380 | topsrv->tipc_conn_new = tipc_subscrb_connect_cb; | ||
381 | topsrv->tipc_conn_release = tipc_subscrb_release_cb; | ||
382 | 367 | ||
383 | strncpy(topsrv->name, name, strlen(name) + 1); | 368 | strncpy(topsrv->name, name, strlen(name) + 1); |
384 | tn->topsrv = topsrv; | 369 | tn->topsrv = topsrv; |