aboutsummaryrefslogtreecommitdiffstats
path: root/src/main.c
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2009-01-18 18:10:15 +0100
committerMax Kellermann <max@duempel.org>2009-01-18 18:10:15 +0100
commit0dd2dfff9d7fd8208d87eae98c6cd8976d4b2e38 (patch)
tree736e3572b8d15874db7080c21f60f9d76f38c22c /src/main.c
parent84de45afbaed7ea27f7ac84f3adf1faa26f61879 (diff)
downloadmpd-0dd2dfff9d7fd8208d87eae98c6cd8976d4b2e38.tar.gz
mpd-0dd2dfff9d7fd8208d87eae98c6cd8976d4b2e38.tar.xz
mpd-0dd2dfff9d7fd8208d87eae98c6cd8976d4b2e38.zip
main: moved the save_state timer to state_file.c
The state_file library should manage its own regular saves.
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c18
1 files changed, 0 insertions, 18 deletions
diff --git a/src/main.c b/src/main.c
index 399a4f2a4..aeb067f9b 100644
--- a/src/main.c
+++ b/src/main.c
@@ -165,14 +165,6 @@ initialize_decoder_and_player(void)
dc_init();
}
-static gboolean
-timer_save_state_file(G_GNUC_UNUSED gpointer data)
-{
- g_debug("Saving state file");
- write_state_file();
- return true;
-}
-
/**
* event_pipe callback function for PIPE_EVENT_IDLE
*/
@@ -190,8 +182,6 @@ int main(int argc, char *argv[])
{
Options options;
clock_t start;
- GTimer *save_state_timer;
- guint save_state_source_id;
daemonize_close_stdin();
@@ -265,11 +255,6 @@ int main(int argc, char *argv[])
state_file_init(config_get_path(CONF_STATE_FILE));
- save_state_timer = g_timer_new();
-
- save_state_source_id = g_timeout_add(5 * 60 * 1000,
- timer_save_state_file, NULL);
-
/* run the main loop */
g_main_loop_run(main_loop);
@@ -278,9 +263,6 @@ int main(int argc, char *argv[])
g_main_loop_unref(main_loop);
- g_source_remove(save_state_source_id);
- g_timer_destroy(save_state_timer);
-
state_file_finish();
playerKill();
finishZeroconf();