handle core error better

Use the PW_ID_CORE constant
Quit the mainloop when server disconnected in the tools

See #395
This commit is contained in:
Wim Taymans 2020-11-20 12:29:51 +01:00
parent 387009e0d6
commit b3aa346063
11 changed files with 13 additions and 20 deletions

View file

@ -346,9 +346,8 @@ static void on_core_error(void *data, uint32_t id, int seq, int res, const char
pw_log_error("error id:%u seq:%d res:%d (%s): %s",
id, seq, res, spa_strerror(res), message);
if (id == 0) {
if (id == PA_ID_CORE && res == -EPIPE)
pw_main_loop_quit(impl->loop);
}
}
static const struct pw_core_events core_events = {