Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 290510
b: refs/heads/master
c: 077a26f
h: refs/heads/master
v: v3
  • Loading branch information
Allan Stephens authored and Paul Gortmaker committed Feb 24, 2012
1 parent 8973250 commit c63596d
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 16 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: bc9f8143ecf96c17a56635d2ef4c3c6b6ec27947
refs/heads/master: 077a26f029e76a5918edf9c1d44d5566eec719fc
7 changes: 2 additions & 5 deletions trunk/net/tipc/config.c
Original file line number Diff line number Diff line change
Expand Up @@ -252,11 +252,8 @@ static struct sk_buff *cfg_set_max_ports(void)
if (value < 127 || value > 65535)
return tipc_cfg_reply_error_string(TIPC_CFG_INVALID_VALUE
" (max ports must be 127-65535)");
if (tipc_mode != TIPC_NOT_RUNNING)
return tipc_cfg_reply_error_string(TIPC_CFG_NOT_SUPPORTED
" (cannot change max ports while TIPC is active)");
tipc_max_ports = value;
return tipc_cfg_reply_none();
return tipc_cfg_reply_error_string(TIPC_CFG_NOT_SUPPORTED
" (cannot change max ports while TIPC is active)");
}

static struct sk_buff *cfg_set_netid(void)
Expand Down
10 changes: 1 addition & 9 deletions trunk/net/tipc/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@

/* global variables used by multiple sub-systems within TIPC */

int tipc_mode = TIPC_NOT_RUNNING;
int tipc_mode;
int tipc_random;

const char tipc_alphabet[] =
Expand Down Expand Up @@ -125,11 +125,6 @@ int tipc_core_start_net(unsigned long addr)

static void tipc_core_stop(void)
{
if (tipc_mode != TIPC_NODE_MODE)
return;

tipc_mode = TIPC_NOT_RUNNING;

tipc_netlink_stop();
tipc_handler_stop();
tipc_cfg_stop();
Expand All @@ -148,9 +143,6 @@ static int tipc_core_start(void)
{
int res;

if (tipc_mode != TIPC_NOT_RUNNING)
return -ENOPROTOOPT;

get_random_bytes(&tipc_random, sizeof(tipc_random));
tipc_mode = TIPC_NODE_MODE;

Expand Down
2 changes: 1 addition & 1 deletion trunk/net/tipc/core.h
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ void tipc_msg_dbg(struct print_buf *, struct tipc_msg *, const char *);
/*
* TIPC operating mode routines
*/
#define TIPC_NOT_RUNNING 0

#define TIPC_NODE_MODE 1
#define TIPC_NET_MODE 2

Expand Down

0 comments on commit c63596d

Please sign in to comment.