summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulian Bouzas <julian.bouzas@collabora.com>2019-07-31 12:11:04 -0400
committerWim Taymans <wim.taymans@gmail.com>2019-08-01 15:31:54 +0200
commitd274497e3c01f160f5bcd1bd4d13f7638cb3477e (patch)
treea8f261b6125ef0f5003d2a3fb21017d18c4ca7ca
parent29d73e343744f65dc481c846a2d128942b3e3271 (diff)
bluez: unset sco and rfcomm fd when destroying transport
-rw-r--r--spa/plugins/bluez5/bluez5-monitor.c2
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;
}