]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
[Bluetooth] Return EINPROGRESS for non-blocking socket calls
authorMarcel Holtmann <marcel@holtmann.org>
Thu, 25 Jan 2007 19:29:55 +0000 (20:29 +0100)
committerAdrian Bunk <bunk@stusta.de>
Fri, 26 Jan 2007 19:49:22 +0000 (20:49 +0100)
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>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
net/bluetooth/af_bluetooth.c
net/bluetooth/rfcomm/core.c

index fb031fe9be9ed140bce6fdfe6092f3ab6df8ff87..6ebcc8d4b559b14fceb8b268e4b635f11b06f184 100644 (file)
@@ -274,7 +274,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 5b4253c61f628d2c7256f5ac5f196bd20b40f5ce..b9ec4c3e4a59990b3ecd5b0dcb4dbd15de599d9c 100644 (file)
@@ -640,7 +640,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);