From 150589a813b8ab1cbcd7697c2b8f48a6adcab2d2 Mon Sep 17 00:00:00 2001 From: Jon Bergli Heier Date: Thu, 13 Aug 2009 15:25:47 +0200 Subject: Store files as a linked list. --- config.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'config.c') diff --git a/config.c b/config.c index 3d683c2..de9b8aa 100644 --- a/config.c +++ b/config.c @@ -70,9 +70,6 @@ int cfg_init() { continue; } int file_count = config_setting_length(files); - /* Break if we can't set file count, most likely any following channels will also fail. */ - if(!channel_set_file_count(channel, file_count)) - break; /* Iterate through files. */ for(int j = 0; j < file_count; j++) { const char *filepath; @@ -96,7 +93,7 @@ int cfg_init() { filepath = config_setting_get_string(file); rs_index = 0; } - if(!channel_set_file(channel, j, filepath, rs_index)) { + if(!channel_file_add(channel, filepath, rs_index)) { fprintf(stderr, "Failed to set file #%d (%s) for channel %s.\n", j+1, filepath, name); } } -- cgit v1.2.3 From bd1f1deafc7f1fec1612d3776377f685f056e5f7 Mon Sep 17 00:00:00 2001 From: Jon Bergli Heier Date: Fri, 14 Aug 2009 01:25:46 +0200 Subject: Main loop groundwork. --- config.c | 1 - 1 file changed, 1 deletion(-) (limited to 'config.c') diff --git a/config.c b/config.c index de9b8aa..d50c90b 100644 --- a/config.c +++ b/config.c @@ -59,7 +59,6 @@ int cfg_init() { sprintf(sname, "channel #%d", i+1); name = sname; } - printf("Channel %s\n", name); struct channel_t *channel; if(!(channel = channel_add(name))) { return 0; -- cgit v1.2.3