mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-10-31 22:25:38 -04:00
bluez5: backend-native: fix sco HUP|ERR debug message
Print the error in td->err (the SO_ERROR) or else let the user know this is a regular hangup. The previous printout was always reporting EAGAIN (remainder in errno from the event loop code, I suppose) as an error, without any real data.
This commit is contained in:
parent
2ea8d3430c
commit
92643f77f9
1 changed files with 10 additions and 1 deletions
|
|
@ -2841,11 +2841,20 @@ static int sco_release_cb(void *data)
|
|||
static void sco_event(struct spa_source *source)
|
||||
{
|
||||
struct spa_bt_transport *t = source->data;
|
||||
struct transport_data *td = t->user_data;
|
||||
struct impl *backend = SPA_CONTAINER_OF(t->backend, struct impl, this);
|
||||
|
||||
if (source->rmask & (SPA_IO_HUP | SPA_IO_ERR)) {
|
||||
spa_log_debug(backend->log, "transport %p: error on SCO socket: %s", t, strerror(errno));
|
||||
/* sco_ready() reads the socket error status in td->err */
|
||||
sco_ready(t);
|
||||
|
||||
if (td->err < 0) {
|
||||
spa_log_info(backend->log, "transport %p: SCO socket error: %s (%d)",
|
||||
t, strerror(-td->err), td->err);
|
||||
} else {
|
||||
spa_log_debug(backend->log, "transport %p: SCO socket hangup", t);
|
||||
}
|
||||
|
||||
if (source->loop)
|
||||
spa_loop_remove_source(source->loop, source);
|
||||
if (t->fd >= 0) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue