summaryrefslogtreecommitdiffstats
path: root/hcid/dbus-rfcomm.c
diff options
context:
space:
mode:
Diffstat (limited to 'hcid/dbus-rfcomm.c')
-rw-r--r--hcid/dbus-rfcomm.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/hcid/dbus-rfcomm.c b/hcid/dbus-rfcomm.c
index 3bae204f..d99939d1 100644
--- a/hcid/dbus-rfcomm.c
+++ b/hcid/dbus-rfcomm.c
@@ -448,8 +448,10 @@ static int rfcomm_connect(DBusConnection *conn, DBusMessage *msg, bdaddr_t *src,
goto failed;
}
- if (set_nonblocking(sk, err) < 0)
+ if (set_nonblocking(sk) < 0) {
+ *err = errno;
goto failed;
+ }
/* So we can reply to the message later */
c->msg = dbus_message_ref(msg);