port: add some more warnings when unregister fails

This commit is contained in:
Wim Taymans 2022-01-23 10:16:42 +01:00
parent 6c84b77e4d
commit f4021c7f44
2 changed files with 8 additions and 4 deletions

View file

@ -4221,9 +4221,11 @@ int jack_port_unregister (jack_client_t *client, jack_port_t *port)
0, 0, NULL, NULL);
res = do_sync(c);
if (res < 0) {
pw_log_warn("can't unregister port %s: %s", o->port.name,
spa_strerror(res));
}
free_port(c, p);
done:
pw_thread_loop_unlock(c->context.loop);

View file

@ -1076,10 +1076,12 @@ static void pw_impl_port_remove(struct pw_impl_port *port)
}
if (port->direction == PW_DIRECTION_INPUT) {
pw_map_insert_at(&node->input_port_map, port->port_id, NULL);
if ((res = pw_map_insert_at(&node->input_port_map, port->port_id, NULL)) < 0)
pw_log_warn("%p: can't remove input port: %s", port, spa_strerror(res));
node->info.n_input_ports--;
} else {
pw_map_insert_at(&node->output_port_map, port->port_id, NULL);
if ((res = pw_map_insert_at(&node->output_port_map, port->port_id, NULL)) < 0)
pw_log_warn("%p: can't remove output port: %s", port, spa_strerror(res));
node->info.n_output_ports--;
}