aboutsummaryrefslogtreecommitdiffstats
path: root/src/main.c
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2009-01-18 18:09:50 +0100
committerMax Kellermann <max@duempel.org>2009-01-18 18:09:50 +0100
commit84de45afbaed7ea27f7ac84f3adf1faa26f61879 (patch)
tree84870bf8178f19cd8b27112f5c0c285a056d03bb /src/main.c
parent1482b22351903557ed2c0596bb3ce53480fb731a (diff)
downloadmpd-84de45afbaed7ea27f7ac84f3adf1faa26f61879.tar.gz
mpd-84de45afbaed7ea27f7ac84f3adf1faa26f61879.tar.xz
mpd-84de45afbaed7ea27f7ac84f3adf1faa26f61879.zip
state_file: added state_file_init() and state_file_finish()
The constructor/destructor interface should hide the functions read_state_file() and write_state_file().
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/main.c b/src/main.c
index c7f9e9987..399a4f2a4 100644
--- a/src/main.c
+++ b/src/main.c
@@ -262,7 +262,8 @@ int main(int argc, char *argv[])
decoder_thread_start();
player_create();
- read_state_file();
+
+ state_file_init(config_get_path(CONF_STATE_FILE));
save_state_timer = g_timer_new();
@@ -280,7 +281,7 @@ int main(int argc, char *argv[])
g_source_remove(save_state_source_id);
g_timer_destroy(save_state_timer);
- write_state_file();
+ state_file_finish();
playerKill();
finishZeroconf();
client_manager_deinit();