Skip to content

Commit

Permalink
audio: fix reacting on mic enable/disable requests
Browse files Browse the repository at this point in the history
After getting an event of QubesDB FD, actually call qdb_read_watch() so
the event is cleared and the next one can be received.

QubesOS/qubes-issues#9619
  • Loading branch information
marmarek committed Dec 4, 2024
1 parent 11703f4 commit 323ac46
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions pulse/pacat-simple-vchan.c
Original file line number Diff line number Diff line change
Expand Up @@ -847,10 +847,19 @@ static void control_socket_callback(pa_mainloop_api *UNUSED(a),

struct userdata *u = userdata;
int new_rec_allowed = -1;
char *watch_path;

if (!(f & PA_IO_EVENT_INPUT))
return;

watch_path = qdb_read_watch(u->qdb);
if (!watch_path) {
pacat_log("Failed to read the qdb watch");
return;
}
/* don't bother checking which watch fired, there is just one */
free(watch_path);

new_rec_allowed = is_rec_allowed_from_qdb(u);
if (new_rec_allowed >= 0) {
g_mutex_lock(&u->prop_mutex);
Expand Down

0 comments on commit 323ac46

Please sign in to comment.