mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2026-05-07 12:06:32 -04:00
bluez5: fix wrong use of F_GETFL and F_SETFL
The pattern is to F_GETFL the flags, then clear the NONBLOCK flag and then F_SETFL the new flags.
This commit is contained in:
parent
195c048d1c
commit
d33466a340
1 changed files with 2 additions and 2 deletions
|
|
@ -2765,13 +2765,13 @@ static void sco_ready(struct spa_bt_transport *t)
|
|||
}
|
||||
|
||||
/* Clear nonblocking flag we set for connect() */
|
||||
err = fcntl(t->fd, F_GETFL, O_NONBLOCK);
|
||||
err = fcntl(t->fd, F_GETFL);
|
||||
if (err < 0) {
|
||||
td->err = -errno;
|
||||
goto done;
|
||||
}
|
||||
err &= ~O_NONBLOCK;
|
||||
err = fcntl(t->fd, F_SETFL, O_NONBLOCK, err);
|
||||
err = fcntl(t->fd, F_SETFL, err);
|
||||
if (err < 0) {
|
||||
td->err = -errno;
|
||||
goto done;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue