Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 266111
b: refs/heads/master
c: a0f40f0
h: refs/heads/master
i:
  266109: ac5ca5f
  266107: 32a7ad4
  266103: 92f0cb8
  266095: 1f1f617
  266079: b712b77
  266047: e3db1ea
  265983: d5509a1
v: v3
  • Loading branch information
Allan Stephens authored and Paul Gortmaker committed Sep 1, 2011
1 parent c4984c3 commit a76b342
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 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: ff60af8c16aa3b8ee51a0a6b4c4ea42342d1607d
refs/heads/master: a0f40f02ef0783688233caf737a17f1f56283e2b
13 changes: 7 additions & 6 deletions trunk/net/tipc/socket.c
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ struct tipc_sock {
struct sock sk;
struct tipc_port *p;
struct tipc_portid peer_name;
long conn_timeout;
unsigned int conn_timeout;
};

#define tipc_sk(sk) ((struct tipc_sock *)(sk))
Expand Down Expand Up @@ -231,7 +231,7 @@ static int tipc_create(struct net *net, struct socket *sock, int protocol,
sock_init_data(sock, sk);
sk->sk_backlog_rcv = backlog_rcv;
tipc_sk(sk)->p = tp_ptr;
tipc_sk(sk)->conn_timeout = msecs_to_jiffies(CONN_TIMEOUT_DEFAULT);
tipc_sk(sk)->conn_timeout = CONN_TIMEOUT_DEFAULT;

spin_unlock_bh(tp_ptr->lock);

Expand Down Expand Up @@ -1369,7 +1369,7 @@ static int connect(struct socket *sock, struct sockaddr *dest, int destlen,
struct msghdr m = {NULL,};
struct sk_buff *buf;
struct tipc_msg *msg;
long timeout;
unsigned int timeout;
int res;

lock_sock(sk);
Expand Down Expand Up @@ -1434,7 +1434,8 @@ static int connect(struct socket *sock, struct sockaddr *dest, int destlen,
res = wait_event_interruptible_timeout(*sk_sleep(sk),
(!skb_queue_empty(&sk->sk_receive_queue) ||
(sock->state != SS_CONNECTING)),
timeout ? timeout : MAX_SCHEDULE_TIMEOUT);
timeout ? (long)msecs_to_jiffies(timeout)
: MAX_SCHEDULE_TIMEOUT);
lock_sock(sk);

if (res > 0) {
Expand Down Expand Up @@ -1696,7 +1697,7 @@ static int setsockopt(struct socket *sock,
res = tipc_set_portunreturnable(tport->ref, value);
break;
case TIPC_CONN_TIMEOUT:
tipc_sk(sk)->conn_timeout = msecs_to_jiffies(value);
tipc_sk(sk)->conn_timeout = value;
/* no need to set "res", since already 0 at this point */
break;
default:
Expand Down Expand Up @@ -1752,7 +1753,7 @@ static int getsockopt(struct socket *sock,
res = tipc_portunreturnable(tport->ref, &value);
break;
case TIPC_CONN_TIMEOUT:
value = jiffies_to_msecs(tipc_sk(sk)->conn_timeout);
value = tipc_sk(sk)->conn_timeout;
/* no need to set "res", since already 0 at this point */
break;
case TIPC_NODE_RECVQ_DEPTH:
Expand Down

0 comments on commit a76b342

Please sign in to comment.