Skip to content

Commit

Permalink
bap: Fix not always calling bap_io_close on disconnect
Browse files Browse the repository at this point in the history
bap_io_disconnected was getting registered for all links while
connecting which prevented bap_io_close to be called when ISO socket is
disconnected thus the cig_active flag will remain set preventing the IO
to be recreated.
  • Loading branch information
Vudentz committed Sep 1, 2023
1 parent c7fd931 commit d06b912
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions profiles/audio/bap.c
Original file line number Diff line number Diff line change
Expand Up @@ -1924,6 +1924,8 @@ static void bap_connecting(struct bt_bap_stream *stream, bool state, int fd,

if (!ep->io) {
io = g_io_channel_unix_new(fd);
ep->io_id = g_io_add_watch(io, G_IO_HUP | G_IO_ERR | G_IO_NVAL,
bap_io_disconnected, ep);
ep->io = io;
} else
io = ep->io;
Expand Down

0 comments on commit d06b912

Please sign in to comment.