media-session: report error when binding

This commit is contained in:
Wim Taymans 2019-01-30 10:36:00 +01:00
parent e4f58da013
commit 4509bd8cfd

View file

@ -778,26 +778,32 @@ registry_global(void *data,uint32_t id, uint32_t parent_id,
const struct spa_dict *props) const struct spa_dict *props)
{ {
struct impl *impl = data; struct impl *impl = data;
int res;
pw_log_debug(NAME " %p: new global '%d'", impl, id); pw_log_debug(NAME " %p: new global '%d' %d", impl, id, type);
switch (type) { switch (type) {
case PW_TYPE_INTERFACE_Client: case PW_TYPE_INTERFACE_Client:
handle_client(impl, id, parent_id, type, props); res = handle_client(impl, id, parent_id, type, props);
break; break;
case PW_TYPE_INTERFACE_Node: case PW_TYPE_INTERFACE_Node:
handle_node(impl, id, parent_id, type, props); res = handle_node(impl, id, parent_id, type, props);
break; break;
case PW_TYPE_INTERFACE_Port: case PW_TYPE_INTERFACE_Port:
handle_port(impl, id, parent_id, type, props); res = handle_port(impl, id, parent_id, type, props);
break; break;
default: default:
res = 0;
break; break;
} }
schedule_rescan(impl); if (res < 0) {
pw_log_warn(NAME" %p: can't handle global %d", impl, id);
}
else
schedule_rescan(impl);
} }
static void static void