Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 237465
b: refs/heads/master
c: 9624154
h: refs/heads/master
i:
  237463: 9b8120d
v: v3
  • Loading branch information
Rémi Denis-Courmont authored and David S. Miller committed Feb 25, 2011
1 parent bef6bce commit 7f45d32
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 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: b08cd667c4b6641c4d16a3f87f4550f81a6d69ac
refs/heads/master: 96241544ca34721d601925850868188d6304cc0f
10 changes: 5 additions & 5 deletions trunk/net/phonet/socket.c
Original file line number Diff line number Diff line change
Expand Up @@ -428,19 +428,19 @@ static int pn_socket_listen(struct socket *sock, int backlog)
struct sock *sk = sock->sk;
int err = 0;

if (sock->state != SS_UNCONNECTED)
return -EINVAL;
if (pn_socket_autobind(sock))
return -ENOBUFS;

lock_sock(sk);
if (sk->sk_state != TCP_CLOSE) {
if (sock->state != SS_UNCONNECTED) {
err = -EINVAL;
goto out;
}

sk->sk_state = TCP_LISTEN;
sk->sk_ack_backlog = 0;
if (sk->sk_state != TCP_LISTEN) {
sk->sk_state = TCP_LISTEN;
sk->sk_ack_backlog = 0;
}
sk->sk_max_ack_backlog = backlog;
out:
release_sock(sk);
Expand Down

0 comments on commit 7f45d32

Please sign in to comment.