From cce2455bc6891cf4fe7ceeafa4f7bf14f5097c1e Mon Sep 17 00:00:00 2001 From: Moritz Grimm Date: Fri, 14 Oct 2016 16:19:39 +0200 Subject: [PATCH] Rename config file (re)load function for clarity --- src/cfg.c | 2 +- src/cfg.h | 2 +- src/ezstream.c | 2 +- tests/check_cfg_xmlfile.c | 18 +++++++++--------- 4 files changed, 12 insertions(+), 12 deletions(-) diff --git a/src/cfg.c b/src/cfg.c index 48f8253..30660ef 100644 --- a/src/cfg.c +++ b/src/cfg.c @@ -157,7 +157,7 @@ cfg_clear(void) } int -cfg_reload(void) +cfg_file_reload(void) { cfg_save(); if (0 > _cfg_load()) { diff --git a/src/cfg.h b/src/cfg.h index 49d15c8..d1adbc8 100644 --- a/src/cfg.h +++ b/src/cfg.h @@ -79,7 +79,7 @@ void cfg_clear(void); int cfg_check(const char **); -int cfg_reload(void); +int cfg_file_reload(void); int cfg_stream_str2fmt(const char *, enum cfg_stream_format *); const char * diff --git a/src/ezstream.c b/src/ezstream.c index 957fe01..0ed1a53 100644 --- a/src/ezstream.c +++ b/src/ezstream.c @@ -780,7 +780,7 @@ main(int argc, char *argv[]) 0 > cfg_decoder_init() || 0 > cfg_encoder_init() || 0 > playlist_init() || - 0 > cfg_reload() || + 0 > cfg_file_reload() || 0 > stream_init()) return (ez_shutdown(ret)); diff --git a/tests/check_cfg_xmlfile.c b/tests/check_cfg_xmlfile.c index d94d1e1..bb88fdc 100644 --- a/tests/check_cfg_xmlfile.c +++ b/tests/check_cfg_xmlfile.c @@ -11,29 +11,29 @@ START_TEST(test_reload) { ck_assert_int_eq(cfg_set_program_config_file(EXAMPLESDIR "/ezstream-file_template.xml", NULL), 0); - ck_assert_int_eq(cfg_reload(), 0); + ck_assert_int_eq(cfg_file_reload(), 0); ck_assert_int_eq(cfg_set_program_config_file(EXAMPLESDIR "/ezstream-full.xml", NULL), 0); - ck_assert_int_eq(cfg_reload(), 0); + ck_assert_int_eq(cfg_file_reload(), 0); ck_assert_int_eq(cfg_set_program_config_file(EXAMPLESDIR "/ezstream-minimal.xml", NULL), 0); - ck_assert_int_eq(cfg_reload(), 0); + ck_assert_int_eq(cfg_file_reload(), 0); ck_assert_int_eq(cfg_set_program_config_file(EXAMPLESDIR "/ezstream-video.xml", NULL), 0); - ck_assert_int_eq(cfg_reload(), 0); - ck_assert_int_eq(cfg_reload(), 0); + ck_assert_int_eq(cfg_file_reload(), 0); + ck_assert_int_eq(cfg_file_reload(), 0); ck_assert_int_eq(cfg_set_program_config_file(SRCDIR "/config-bad.xml", NULL), 0); - ck_assert_int_eq(cfg_reload(), -1); + ck_assert_int_eq(cfg_file_reload(), -1); ck_assert_int_eq(cfg_set_program_config_file(SRCDIR "/config-bad2.xml", NULL), 0); - ck_assert_int_eq(cfg_reload(), -1); + ck_assert_int_eq(cfg_file_reload(), -1); ck_assert_int_eq(cfg_set_program_config_file(SRCDIR "/config-bad3.xml", NULL), 0); - ck_assert_int_eq(cfg_reload(), -1); + ck_assert_int_eq(cfg_file_reload(), -1); ck_assert_int_eq(cfg_set_program_config_file(SRCDIR "/config-bad4.xml", NULL), 0); - ck_assert_int_eq(cfg_reload(), -1); + ck_assert_int_eq(cfg_file_reload(), -1); } END_TEST