pulse-server: fix set-port

Parse the name as a string
Pass the device id and port_id in the right properties
Return an error when unknown port was specified.

Fixes #443
This commit is contained in:
Wim Taymans 2020-12-04 15:41:11 +01:00
parent 745b7ee900
commit c6663b6a18
2 changed files with 6 additions and 4 deletions

View file

@ -523,7 +523,7 @@ static uint32_t find_port_id(struct pw_manager_object *card, uint32_t direction,
SPA_TYPE_OBJECT_ParamRoute, NULL,
SPA_PARAM_ROUTE_index, SPA_POD_Int(&id),
SPA_PARAM_ROUTE_direction, SPA_POD_Id(&dir),
SPA_PARAM_ROUTE_name, SPA_POD_Id(&name)) < 0)
SPA_PARAM_ROUTE_name, SPA_POD_String(&name)) < 0)
continue;
if (dir != direction)
continue;