From 2d6f9950a5e036f908953727e61e3b3fb02eacf0 Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Mon, 12 Aug 2019 12:28:54 +0200 Subject: [PATCH] jack: improve node name Try to use the short nick first and then the name/description --- src/pipewire-jack.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/pipewire-jack.c b/src/pipewire-jack.c index 0fa37b631..93c703814 100644 --- a/src/pipewire-jack.c +++ b/src/pipewire-jack.c @@ -1469,8 +1469,11 @@ static void registry_event_global(void *data, uint32_t id, uint32_t parent_id, switch (type) { case PW_TYPE_INTERFACE_Node: - if ((str = spa_dict_lookup(props, PW_KEY_NODE_NAME)) == NULL) - goto exit; + if ((str = spa_dict_lookup(props, PW_KEY_NODE_NICK)) == NULL && + (str = spa_dict_lookup(props, PW_KEY_NODE_DESCRIPTION)) == NULL && + (str = spa_dict_lookup(props, PW_KEY_NODE_NAME)) == NULL) { + str = "node"; + } o = alloc_object(c); spa_list_append(&c->context.nodes, &o->link);