diff options
author | Julian Bouzas <julian.bouzas@collabora.com> | 2019-07-31 12:11:04 -0400 |
---|---|---|
committer | Wim Taymans <wim.taymans@gmail.com> | 2019-08-01 15:31:54 +0200 |
commit | d274497e3c01f160f5bcd1bd4d13f7638cb3477e (patch) | |
tree | a8f261b6125ef0f5003d2a3fb21017d18c4ca7ca | |
parent | 29d73e343744f65dc481c846a2d128942b3e3271 (diff) |
bluez: unset sco and rfcomm fd when destroying transport
-rw-r--r-- | spa/plugins/bluez5/bluez5-monitor.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/spa/plugins/bluez5/bluez5-monitor.c b/spa/plugins/bluez5/bluez5-monitor.c index 7f22d65d..b101592f 100644 --- a/spa/plugins/bluez5/bluez5-monitor.c +++ b/spa/plugins/bluez5/bluez5-monitor.c @@ -1644,12 +1644,14 @@ static int sco_destroy_cb(void *data) spa_loop_remove_source(td->sco.loop, &td->sco); shutdown(td->sco.fd, SHUT_RDWR); close (td->sco.fd); + td->sco.fd = -1; } if (td->rfcomm.data) { if (td->rfcomm.loop) spa_loop_remove_source(td->rfcomm.loop, &td->rfcomm); shutdown(td->rfcomm.fd, SHUT_RDWR); close (td->rfcomm.fd); + td->rfcomm.fd = -1; } return 0; } |