improve logging

Remove some harmless warnings from the log
Remove some excessive info logging
This commit is contained in:
Wim Taymans 2020-02-21 11:09:34 +01:00
parent a528189d26
commit d8bac82e72
11 changed files with 24 additions and 25 deletions

View file

@ -128,10 +128,10 @@ context_check_access(void *data, struct pw_impl_client *client)
}
if (pid < 0) {
pw_log_info("no trusted pid found, assuming not sandboxed\n");
pw_log_info("client %p: no trusted pid found, assuming not sandboxed", client);
goto granted;
} else {
pw_log_info("client has trusted pid %d", pid);
pw_log_info("client %p has trusted pid %d", client, pid);
}
if (impl->properties && (str = pw_properties_get(impl->properties, "blacklisted")) != NULL) {

View file

@ -322,7 +322,7 @@ static int impl_node_set_param(void *object, uint32_t id, uint32_t flags,
spa_return_val_if_fail(this != NULL, -EINVAL);
if (this->resource == NULL)
return -EIO;
return param == NULL ? 0 : -EIO;
return pw_client_node_resource_set_param(this->resource, id, flags, param);
}
@ -357,7 +357,7 @@ static int impl_node_set_io(void *object, uint32_t id, void *data, size_t size)
}
if (this->resource == NULL)
return -EIO;
return data == NULL ? 0 : -EIO;
return pw_client_node_resource_set_io(this->resource,
id,
@ -626,8 +626,7 @@ impl_node_port_set_param(void *object,
}
}
if (this->resource == NULL)
return -EIO;
return param == NULL ? 0 : -EIO;
return pw_client_node_resource_port_set_param(this->resource,
direction, port_id,
@ -677,7 +676,7 @@ static int do_port_set_io(struct impl *impl,
}
if (this->resource == NULL)
return -EIO;
return data == NULL ? 0 : -EIO;
return pw_client_node_resource_port_set_io(this->resource,
direction, port_id,
@ -740,7 +739,7 @@ do_port_use_buffers(struct impl *impl,
mix->n_buffers = n_buffers;
if (this->resource == NULL)
return -EIO;
return n_buffers == 0 ? 0 : -EIO;
for (i = 0; i < n_buffers; i++) {
struct buffer *b = &mix->buffers[i];
@ -1404,7 +1403,7 @@ static int impl_mix_port_set_io(void *object,
mix = pw_map_lookup(&port->mix_port_map, mix_id);
if (mix == NULL)
return -EIO;
return -EINVAL;
if (id == SPA_IO_Buffers) {
if (data && size >= sizeof(struct spa_io_buffers))

View file

@ -145,7 +145,7 @@ static void *connection_ensure_size(struct pw_protocol_native_connection *conn,
errno = -res;
return NULL;
}
pw_log_warn("connection %p: resize buffer to %zd %zd %zd",
pw_log_debug("connection %p: resize buffer to %zd %zd %zd",
conn, buf->buffer_size, size, buf->buffer_maxsize);
}
return (uint8_t *) buf->buffer_data + buf->buffer_size;