Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 198581
b: refs/heads/master
c: 9e4b816
h: refs/heads/master
i:
  198579: db9531a
v: v3
  • Loading branch information
Sjur Braendeland authored and David S. Miller committed May 24, 2010
1 parent b677e19 commit c3f0eb7
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 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: 8ce6cebc2f126f3ecf2d80746ea54245adf18057
refs/heads/master: 9e4b816bc31962ebbb8784d602acd5fa25a08ad8
13 changes: 6 additions & 7 deletions trunk/net/caif/caif_socket.c
Original file line number Diff line number Diff line change
Expand Up @@ -920,17 +920,17 @@ static int caif_connect(struct socket *sock, struct sockaddr *uaddr,
timeo = sock_sndtimeo(sk, flags & O_NONBLOCK);

release_sock(sk);
err = wait_event_interruptible_timeout(*sk_sleep(sk),
err = -ERESTARTSYS;
timeo = wait_event_interruptible_timeout(*sk_sleep(sk),
sk->sk_state != CAIF_CONNECTING,
timeo);
lock_sock(sk);
if (err < 0)
if (timeo < 0)
goto out; /* -ERESTARTSYS */
if (err == 0 && sk->sk_state != CAIF_CONNECTED) {
err = -ETIMEDOUT;
goto out;
}

err = -ETIMEDOUT;
if (timeo == 0 && sk->sk_state != CAIF_CONNECTED)
goto out;
if (sk->sk_state != CAIF_CONNECTED) {
sock->state = SS_UNCONNECTED;
err = sock_error(sk);
Expand All @@ -945,7 +945,6 @@ static int caif_connect(struct socket *sock, struct sockaddr *uaddr,
return err;
}


/*
* caif_release() - Disconnect a CAIF Socket
* Copied and modified af_irda.c:irda_release().
Expand Down

0 comments on commit c3f0eb7

Please sign in to comment.