From 96e4d5289ad28ecaccb024978cc4c0e47b75052f Mon Sep 17 00:00:00 2001 From: Nedko Arnaudov Date: Fri, 11 Dec 2009 01:41:28 +0200 Subject: [PATCH] daemon: fix a2j handling --- daemon/virtualizer.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/daemon/virtualizer.c b/daemon/virtualizer.c index 1161acd2..707a67d6 100644 --- a/daemon/virtualizer.c +++ b/daemon/virtualizer.c @@ -93,17 +93,10 @@ static void client_appeared(void * context, uint64_t id, const char * name) ladish_client_handle client; const char * a2j_name; bool is_a2j; - char * app_name; + char * app_name = NULL; log_info("client_appeared(%"PRIu64", %s)", id, name); - app_name = get_app_name(virtualizer_ptr, id); - if (app_name != NULL) - { - log_info("app name is '%s'", app_name); - name = app_name; - } - a2j_name = a2j_proxy_get_jack_client_name_cached(); is_a2j = a2j_name != NULL && strcmp(a2j_name, name) == 0; @@ -113,6 +106,13 @@ static void client_appeared(void * context, uint64_t id, const char * name) } else { + app_name = get_app_name(virtualizer_ptr, id); + if (app_name != NULL) + { + log_info("app name is '%s'", app_name); + name = app_name; + } + client = ladish_graph_find_client_by_name(virtualizer_ptr->jack_graph, name); } -- 2.11.4.GIT