diff --git a/pulse/pacat-simple-vchan.c b/pulse/pacat-simple-vchan.c index 1cc997da..edb9127b 100644 --- a/pulse/pacat-simple-vchan.c +++ b/pulse/pacat-simple-vchan.c @@ -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);