Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 266117
b: refs/heads/master
c: 149ce37
h: refs/heads/master
i:
  266115: e421575
v: v3
  • Loading branch information
Allan Stephens authored and Paul Gortmaker committed Sep 18, 2011
1 parent 3e028f0 commit b2a4463
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 909234cdd2b5954374e346c105b648f6c2800f55
refs/heads/master: 149ce37c8de72c64fc4f66c1b4cf7a0fb66b7ee9
22 changes: 19 additions & 3 deletions trunk/net/tipc/name_distr.c
Original file line number Diff line number Diff line change
Expand Up @@ -175,16 +175,32 @@ void tipc_named_withdraw(struct publication *publ)

void tipc_named_node_up(unsigned long node)
{
struct tipc_node *n_ptr;
struct link *l_ptr;
struct publication *publ;
struct distr_item *item = NULL;
struct sk_buff *buf = NULL;
u32 left = 0;
u32 rest;
u32 max_item_buf;
u32 max_item_buf = 0;

/* compute maximum amount of publication data to send per message */

read_lock_bh(&tipc_net_lock);
n_ptr = tipc_node_find((u32)node);
if (n_ptr) {
tipc_node_lock(n_ptr);
l_ptr = n_ptr->active_links[0];
if (l_ptr)
max_item_buf = ((l_ptr->max_pkt - INT_H_SIZE) /
ITEM_SIZE) * ITEM_SIZE;
tipc_node_unlock(n_ptr);
}
read_unlock_bh(&tipc_net_lock);
if (!max_item_buf)
return;

read_lock_bh(&tipc_nametbl_lock);
max_item_buf = TIPC_MAX_USER_MSG_SIZE / ITEM_SIZE;
max_item_buf *= ITEM_SIZE;
rest = publ_cnt * ITEM_SIZE;

list_for_each_entry(publ, &publ_root, local_list) {
Expand Down

0 comments on commit b2a4463

Please sign in to comment.