Small cleanups

Improve debug
Fix core info event, pass the copied info around in remote.
This commit is contained in:
Wim Taymans 2017-09-15 14:47:54 +02:00
parent 26e9daf6b7
commit 2ca25e5bf4
5 changed files with 15 additions and 17 deletions

View file

@ -321,7 +321,7 @@ pw_protocol_native_connection_get_next(struct pw_protocol_native_connection *con
if (debug_messages) {
printf("<<<<<<<<< in:\n");
printf("<<<<<<<<< in: %d %d %zd\n", *dest_id, *opcode, len);
spa_debug_pod((struct spa_pod *)data);
}
@ -427,7 +427,7 @@ pw_protocol_native_connection_end(struct pw_protocol_native_connection *conn,
buf->buffer_size += 8 + size;
if (debug_messages) {
printf(">>>>>>>>> out:\n");
printf(">>>>>>>>> out: %d %d %d\n", impl->dest_id, impl->opcode, size);
spa_debug_pod((struct spa_pod *)p);
}
spa_hook_list_call(&conn->listener_list, struct pw_protocol_native_connection_events, need_flush);

View file

@ -52,7 +52,7 @@ static struct pw_node *create_node(void *_data,
lib = pw_properties_get(properties, "spa.library.name");
factory_name = pw_properties_get(properties, "spa.factory.name");
if(lib == NULL || factory_name == NULL)
if (lib == NULL || factory_name == NULL)
goto no_properties;
node = pw_spa_node_load(data->core,
@ -68,9 +68,12 @@ static struct pw_node *create_node(void *_data,
return node;
no_properties:
pw_log_error("missing properties");
pw_log_error("needed properties: spa.library.name=<library-name> spa.factory.name=<factory-name>");
if (resource) {
pw_resource_error(resource, SPA_RESULT_INVALID_ARGUMENTS, "missing properties");
pw_resource_error(resource, SPA_RESULT_INVALID_ARGUMENTS,
"needed properties: "
"spa.library.name=<library-name> "
"spa.factory.name=<factory-name>");
}
return NULL;
no_mem: