]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commitdiff
[Bluetooth] Return EINPROGRESS for non-blocking socket calls
authorMarcel Holtmann <marcel@holtmann.org>
Sat, 23 Sep 2006 07:54:38 +0000 (09:54 +0200)
committerDavid S. Miller <davem@sunset.davemloft.net>
Fri, 29 Sep 2006 01:01:31 +0000 (18:01 -0700)
In case of non-blocking socket calls we should return EINPROGRESS
and not EAGAIN.

Signed-off-by: Ulisses Furquim <ulissesf@gmail.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
net/bluetooth/af_bluetooth.c
net/bluetooth/rfcomm/core.c

index 788ea7a2b74498c10534501e62c3e91fd17c117e..305a099b7477eb8fd0e4a7a7b487b7bd435e6677 100644 (file)
@@ -276,7 +276,7 @@ int bt_sock_wait_state(struct sock *sk, int state, unsigned long timeo)
                set_current_state(TASK_INTERRUPTIBLE);
 
                if (!timeo) {
-                       err = -EAGAIN;
+                       err = -EINPROGRESS;
                        break;
                }
 
index 332dd8f436ea0a2957df07db7d7b4aedcffa888f..468df3b953f6d3c615169a0939e50ec924eb1af8 100644 (file)
@@ -644,7 +644,7 @@ static struct rfcomm_session *rfcomm_session_create(bdaddr_t *src, bdaddr_t *dst
        addr.l2_family = AF_BLUETOOTH;
        addr.l2_psm    = htobs(RFCOMM_PSM);
        *err = sock->ops->connect(sock, (struct sockaddr *) &addr, sizeof(addr), O_NONBLOCK);
-       if (*err == 0 || *err == -EAGAIN)
+       if (*err == 0 || *err == -EINPROGRESS)
                return s;
 
        rfcomm_session_del(s);