1
0
mirror of https://gitlab.xiph.org/xiph/ezstream.git synced 2024-11-03 04:17:18 -05:00

Fix misleading function name

This commit is contained in:
Moritz Grimm 2016-10-14 16:23:32 +02:00
parent 14dbc1447a
commit cec131e83a
3 changed files with 8 additions and 8 deletions

View File

@ -136,18 +136,18 @@ cfg_exit(void)
void
cfg_save(void)
{
_cfg_reset(&cfg_tmp);
cfg_clear();
_cfg_copy(&cfg_tmp, &cfg);
}
void
cfg_pop(void)
cfg_restore(void)
{
if (!cfg_tmp._master_cfg)
return;
_cfg_reset(&cfg);
_cfg_copy(&cfg, &cfg_tmp);
_cfg_reset(&cfg_tmp);
cfg_clear();
}
void
@ -161,7 +161,7 @@ cfg_file_reload(void)
{
cfg_save();
if (0 > _cfg_load()) {
cfg_pop();
cfg_restore();
return (-1);
}
cfg_clear();

View File

@ -74,7 +74,7 @@ int cfg_init(void);
void cfg_exit(void);
void cfg_save(void);
void cfg_pop(void);
void cfg_restore(void);
void cfg_clear(void);
int cfg_check(const char **);

View File

@ -108,13 +108,13 @@ START_TEST(test_stash)
cfg_save();
ck_assert_int_eq(cfg_set_stream_name("test_stash2", NULL), 0);
ck_assert_str_eq(cfg_get_stream_name(), "test_stash2");
cfg_pop();
cfg_restore();
ck_assert_str_eq(cfg_get_stream_name(), "test_stash");
cfg_pop();
cfg_restore();
ck_assert_str_eq(cfg_get_stream_name(), "test_stash");
cfg_save();
cfg_clear();
cfg_pop();
cfg_restore();
ck_assert_str_eq(cfg_get_stream_name(), "test_stash");
}
END_TEST