mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-10-29 05:40:27 -04:00
protocol-native: change some warnings to infos
Errors caused by EPIPE/Connection reset by peer should not cause an error in the pipewire log, but rather an info.
This commit is contained in:
parent
65b2405262
commit
8abd6b3fe4
2 changed files with 10 additions and 2 deletions
|
|
@ -291,7 +291,7 @@ client_busy_changed(void *data, bool busy)
|
|||
|
||||
static void handle_client_error(struct pw_impl_client *client, int res)
|
||||
{
|
||||
if (res == -EPIPE)
|
||||
if (res == -EPIPE || res == -ECONNRESET)
|
||||
pw_log_info("%p: client %p disconnected", client->protocol, client);
|
||||
else
|
||||
pw_log_error("%p: client %p error %d (%s)", client->protocol,
|
||||
|
|
|
|||
|
|
@ -167,6 +167,14 @@ static void *connection_ensure_size(struct pw_protocol_native_connection *conn,
|
|||
return (uint8_t *) buf->buffer_data + buf->buffer_size;
|
||||
}
|
||||
|
||||
static void handle_connection_error(struct pw_protocol_native_connection *conn, int res)
|
||||
{
|
||||
if (res == -EPIPE || res == -ECONNRESET)
|
||||
pw_log_info("connection %p: could not recvmsg on fd:%d: %s", conn, conn->fd, strerror(res));
|
||||
else
|
||||
pw_log_error("connection %p: could not recvmsg on fd:%d: %s", conn, conn->fd, strerror(res));
|
||||
}
|
||||
|
||||
static int refill_buffer(struct pw_protocol_native_connection *conn, struct buffer *buf)
|
||||
{
|
||||
ssize_t len;
|
||||
|
|
@ -224,7 +232,7 @@ static int refill_buffer(struct pw_protocol_native_connection *conn, struct buff
|
|||
|
||||
/* ERRORS */
|
||||
recv_error:
|
||||
pw_log_error("connection %p: could not recvmsg on fd:%d: %m", conn, conn->fd);
|
||||
handle_connection_error(conn, errno);
|
||||
return -errno;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue