Commit bb3a91bd authored by George Kiagiadakis's avatar George Kiagiadakis
Browse files

session: select the default endpoint based on endpoint priority

parent 1d001046
......@@ -239,6 +239,8 @@ do_export (WpPwAudioSoftdspEndpoint *self)
wp_proxy_get_global_id (WP_PROXY (self->proxy_node)));
wp_properties_set (extra_props, PW_KEY_ENDPOINT_CLIENT_ID,
wp_properties_get (props, PW_KEY_CLIENT_ID));
wp_properties_setf (extra_props, "endpoint.priority", "%d",
wp_base_endpoint_get_priority (WP_BASE_ENDPOINT (self)));
wp_exported_endpoint_update_properties (self->exported_ep, props);
wp_exported_endpoint_update_properties (self->exported_ep, extra_props);
......@@ -44,8 +44,10 @@ select_new_default_ep (struct module_data * data, WpDefaultEndpointType type,
if (priority_str)
priority = atoi (priority_str);
if (priority >= max_priority)
if (priority >= max_priority) {
best_id = id;
max_priority = priority;
def_id = wp_session_get_default_endpoint (WP_SESSION (data->session), type);
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment