diff options
Diffstat (limited to 'net/tipc/subscr.c')
| -rw-r--r-- | net/tipc/subscr.c | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/net/tipc/subscr.c b/net/tipc/subscr.c index ca04479c3d42..aae9eae13404 100644 --- a/net/tipc/subscr.c +++ b/net/tipc/subscr.c | |||
| @@ -2,7 +2,7 @@ | |||
| 2 | * net/tipc/subscr.c: TIPC network topology service | 2 | * net/tipc/subscr.c: TIPC network topology service |
| 3 | * | 3 | * |
| 4 | * Copyright (c) 2000-2006, Ericsson AB | 4 | * Copyright (c) 2000-2006, Ericsson AB |
| 5 | * Copyright (c) 2005-2007, Wind River Systems | 5 | * Copyright (c) 2005-2007, 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 |
| @@ -160,7 +160,7 @@ void tipc_subscr_report_overlap(struct subscription *sub, | |||
| 160 | 160 | ||
| 161 | static void subscr_timeout(struct subscription *sub) | 161 | static void subscr_timeout(struct subscription *sub) |
| 162 | { | 162 | { |
| 163 | struct port *server_port; | 163 | struct tipc_port *server_port; |
| 164 | 164 | ||
| 165 | /* Validate server port reference (in case subscriber is terminating) */ | 165 | /* Validate server port reference (in case subscriber is terminating) */ |
| 166 | 166 | ||
| @@ -472,8 +472,6 @@ static void subscr_named_msg_event(void *usr_handle, | |||
| 472 | struct tipc_portid const *orig, | 472 | struct tipc_portid const *orig, |
| 473 | struct tipc_name_seq const *dest) | 473 | struct tipc_name_seq const *dest) |
| 474 | { | 474 | { |
| 475 | static struct iovec msg_sect = {NULL, 0}; | ||
| 476 | |||
| 477 | struct subscriber *subscriber; | 475 | struct subscriber *subscriber; |
| 478 | u32 server_port_ref; | 476 | u32 server_port_ref; |
| 479 | 477 | ||
| @@ -508,7 +506,7 @@ static void subscr_named_msg_event(void *usr_handle, | |||
| 508 | 506 | ||
| 509 | /* Lock server port (& save lock address for future use) */ | 507 | /* Lock server port (& save lock address for future use) */ |
| 510 | 508 | ||
| 511 | subscriber->lock = tipc_port_lock(subscriber->port_ref)->publ.lock; | 509 | subscriber->lock = tipc_port_lock(subscriber->port_ref)->lock; |
| 512 | 510 | ||
| 513 | /* Add subscriber to topology server's subscriber list */ | 511 | /* Add subscriber to topology server's subscriber list */ |
| 514 | 512 | ||
| @@ -523,7 +521,7 @@ static void subscr_named_msg_event(void *usr_handle, | |||
| 523 | 521 | ||
| 524 | /* Send an ACK- to complete connection handshaking */ | 522 | /* Send an ACK- to complete connection handshaking */ |
| 525 | 523 | ||
| 526 | tipc_send(server_port_ref, 1, &msg_sect); | 524 | tipc_send(server_port_ref, 0, NULL); |
| 527 | 525 | ||
| 528 | /* Handle optional subscription request */ | 526 | /* Handle optional subscription request */ |
| 529 | 527 | ||
| @@ -542,7 +540,6 @@ int tipc_subscr_start(void) | |||
| 542 | spin_lock_init(&topsrv.lock); | 540 | spin_lock_init(&topsrv.lock); |
| 543 | INIT_LIST_HEAD(&topsrv.subscriber_list); | 541 | INIT_LIST_HEAD(&topsrv.subscriber_list); |
| 544 | 542 | ||
| 545 | spin_lock_bh(&topsrv.lock); | ||
| 546 | res = tipc_createport(NULL, | 543 | res = tipc_createport(NULL, |
| 547 | TIPC_CRITICAL_IMPORTANCE, | 544 | TIPC_CRITICAL_IMPORTANCE, |
| 548 | NULL, | 545 | NULL, |
| @@ -563,12 +560,10 @@ int tipc_subscr_start(void) | |||
| 563 | goto failed; | 560 | goto failed; |
| 564 | } | 561 | } |
| 565 | 562 | ||
| 566 | spin_unlock_bh(&topsrv.lock); | ||
| 567 | return 0; | 563 | return 0; |
| 568 | 564 | ||
| 569 | failed: | 565 | failed: |
| 570 | err("Failed to create subscription service\n"); | 566 | err("Failed to create subscription service\n"); |
| 571 | spin_unlock_bh(&topsrv.lock); | ||
| 572 | return res; | 567 | return res; |
| 573 | } | 568 | } |
| 574 | 569 | ||
