mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-12-19 08:57:14 -05:00
pulse-server: make control flow easier to unserstand
Use a switch statement to make the control flow a bit easier to understand.
This commit is contained in:
parent
87c00a6f00
commit
bc6adbe15d
1 changed files with 12 additions and 8 deletions
|
|
@ -5630,15 +5630,19 @@ on_client_data(void *data, int fd, uint32_t mask)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
error:
|
error:
|
||||||
if (res == -EPIPE)
|
switch (res) {
|
||||||
pw_log_info(NAME" %p: client:%p [%s] disconnected", impl, client, client->name);
|
case -EPIPE:
|
||||||
else if (res != -EPROTO) {
|
pw_log_info(NAME" %p: client:%p [%s] disconnected", impl, client, client->name);
|
||||||
pw_log_error(NAME" %p: client:%p [%s] error %d (%s)", impl,
|
SPA_FALLTHROUGH;
|
||||||
client, client->name, res, spa_strerror(res));
|
case -EPROTO:
|
||||||
return;
|
client_disconnect(client);
|
||||||
|
client_unref(client);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
pw_log_error(NAME" %p: client:%p [%s] error %d (%s)", impl,
|
||||||
|
client, client->name, res, spa_strerror(res));
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
client_disconnect(client);
|
|
||||||
client_unref(client);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static int check_flatpak(struct client *client, int pid)
|
static int check_flatpak(struct client *client, int pid)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue