From fc68abebddb801535219968b72489811cbe0c5c7 Mon Sep 17 00:00:00 2001 From: radius Date: Sun, 22 Jan 2017 13:39:27 -0500 Subject: [PATCH] find the core from core_info --- tasks/task_netplay_crc.c | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/tasks/task_netplay_crc.c b/tasks/task_netplay_crc.c index 47fbf7d32e..76bc184a3f 100644 --- a/tasks/task_netplay_crc.c +++ b/tasks/task_netplay_crc.c @@ -32,6 +32,7 @@ #include "../configuration.h" #include "../playlist.h" #include "../command.h" +#include "../core_info.h" typedef struct { @@ -47,13 +48,24 @@ static void netplay_crc_scan_callback(void *task_data, void *user_data, const char *error) { netplay_crc_handle_t *state = (netplay_crc_handle_t*)task_data; + core_info_list_t *info = NULL; + int i; + core_info_get_list(&info); if (!state) return; - printf("%s\n", state->hostname); - printf("%s\n", state->path); - printf("%s\n", state->corename); + for (i=0; i < info->count; i++) + { + if(string_is_equal(info->list[i].core_name, state->corename)) + break; + } + + printf("Hostname: %s\n", state->hostname); + printf("Content: %s\n", state->path); + printf("Corename: %s\n", state->corename); + printf("Corepath: %s\n", info->list[i].path); + command_event(CMD_EVENT_NETPLAY_INIT_DIRECT_DEFERRED, state->hostname); free(state);