X-Git-Url: https://vcs.maemo.org/git/?a=blobdiff_plain;f=src%2Fmpd.c;h=ec929b7906a59a097d025f55b9dbc2cbb17b705b;hb=13188c8b110a8cc94f43bc6c5a37b073e3b78430;hp=a4ca152e56d2bee546ba8e2e2d8f5c6888726884;hpb=36ebcf347de0faf57841585118f82ef95e5f1e82;p=monky diff --git a/src/mpd.c b/src/mpd.c index a4ca152..ec929b7 100644 --- a/src/mpd.c +++ b/src/mpd.c @@ -113,23 +113,24 @@ void free_mpd(void) static void *update_mpd_thread(void *) __attribute__((noreturn)); -void update_mpd(void) +int update_mpd(void) { int interval; static timed_thread *thread = NULL; if (thread) - return; + return 0; interval = info.music_player_interval * 1000000; thread = timed_thread_create(&update_mpd_thread, &thread, interval); if (!thread) { NORM_ERR("Failed to create MPD timed thread"); - return; + return 0; } timed_thread_register(thread, &thread); if (timed_thread_run(thread)) NORM_ERR("Failed to run MPD timed thread"); + return 0; } /* stringMAXdup dups at most text_buffer_size bytes */