Add database info to core_info.c

This commit is contained in:
twinaphex 2015-01-25 08:21:02 +01:00
parent 8b086d0cc5
commit 4fc37d4f25
2 changed files with 10 additions and 0 deletions

View File

@ -191,6 +191,12 @@ core_info_list_t *core_info_list_new(const char *modules_path)
core_info[i].categories_list =
string_split(core_info[i].categories, "|");
if (config_get_string(core_info[i].data, "database",
&core_info[i].databases) &&
core_info[i].databases)
core_info[i].databases_list =
string_split(core_info[i].databases, "|");
if (config_get_string(core_info[i].data, "notes",
&core_info[i].notes) &&
core_info[i].notes)
@ -240,6 +246,7 @@ void core_info_list_free(core_info_list_t *core_info_list)
free(info->permissions);
free(info->licenses);
free(info->categories);
free(info->databases);
free(info->notes);
if (info->supported_extensions_list)
string_list_free(info->supported_extensions_list);
@ -248,6 +255,7 @@ void core_info_list_free(core_info_list_t *core_info_list)
string_list_free(info->permissions_list);
string_list_free(info->licenses_list);
string_list_free(info->categories_list);
string_list_free(info->databases_list);
config_file_free(info->data);
for (j = 0; j < info->firmware_count; j++)

View File

@ -48,8 +48,10 @@ typedef struct
char *permissions;
char *licenses;
char *categories;
char *databases;
char *notes;
struct string_list *categories_list;
struct string_list *databases_list;
struct string_list *note_list;
struct string_list *supported_extensions_list;
struct string_list *authors_list;