2009-03-13 18:43:16 +01:00
|
|
|
/*
|
|
|
|
* Copyright (C) 2003-2009 The Music Player Daemon Project
|
|
|
|
* http://www.musicpd.org
|
2004-02-24 00:41:20 +01:00
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
* the Free Software Foundation; either version 2 of the License, or
|
|
|
|
* (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
2009-03-13 18:43:16 +01:00
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License along
|
|
|
|
* with this program; if not, write to the Free Software Foundation, Inc.,
|
|
|
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
2004-02-24 00:41:20 +01:00
|
|
|
*/
|
|
|
|
|
2009-01-02 11:21:33 +01:00
|
|
|
#include "main.h"
|
2008-12-30 16:28:07 +01:00
|
|
|
#include "daemon.h"
|
2008-08-28 20:02:43 +02:00
|
|
|
#include "client.h"
|
2008-10-14 22:38:14 +02:00
|
|
|
#include "idle.h"
|
2004-02-24 00:41:20 +01:00
|
|
|
#include "command.h"
|
|
|
|
#include "playlist.h"
|
2009-01-25 13:53:16 +01:00
|
|
|
#include "stored_playlist.h"
|
2008-10-08 11:07:35 +02:00
|
|
|
#include "database.h"
|
2008-10-08 10:48:48 +02:00
|
|
|
#include "update.h"
|
2008-08-26 08:27:09 +02:00
|
|
|
#include "player_thread.h"
|
2004-02-24 00:41:20 +01:00
|
|
|
#include "listen.h"
|
2008-12-27 19:03:33 +01:00
|
|
|
#include "cmdline.h"
|
2004-02-24 00:41:20 +01:00
|
|
|
#include "conf.h"
|
|
|
|
#include "path.h"
|
2008-10-15 19:36:33 +02:00
|
|
|
#include "mapper.h"
|
2009-03-03 22:23:25 +01:00
|
|
|
#include "chunk.h"
|
2008-08-26 08:45:14 +02:00
|
|
|
#include "decoder_control.h"
|
2008-08-26 08:44:38 +02:00
|
|
|
#include "player_control.h"
|
2004-02-24 00:41:20 +01:00
|
|
|
#include "stats.h"
|
|
|
|
#include "sig_handlers.h"
|
|
|
|
#include "audio.h"
|
2009-02-10 18:51:49 +01:00
|
|
|
#include "output_all.h"
|
2004-02-24 00:41:20 +01:00
|
|
|
#include "volume.h"
|
|
|
|
#include "log.h"
|
|
|
|
#include "permission.h"
|
2008-11-11 15:55:34 +01:00
|
|
|
#include "replay_gain.h"
|
2008-08-26 08:27:08 +02:00
|
|
|
#include "decoder_list.h"
|
2008-10-26 19:38:50 +01:00
|
|
|
#include "input_stream.h"
|
2006-07-31 01:32:47 +02:00
|
|
|
#include "state_file.h"
|
2004-11-10 22:58:27 +01:00
|
|
|
#include "tag.h"
|
2004-11-11 03:36:25 +01:00
|
|
|
#include "dbUtils.h"
|
2009-01-08 21:37:02 +01:00
|
|
|
#include "config.h"
|
2006-07-27 02:50:59 +02:00
|
|
|
#include "normalize.h"
|
2007-01-11 21:41:17 +01:00
|
|
|
#include "zeroconf.h"
|
2009-01-01 18:12:00 +01:00
|
|
|
#include "event_pipe.h"
|
2008-12-28 21:02:30 +01:00
|
|
|
#include "dirvec.h"
|
2008-12-28 21:02:42 +01:00
|
|
|
#include "songvec.h"
|
2008-12-28 22:09:42 +01:00
|
|
|
#include "tag_pool.h"
|
2004-02-24 00:41:20 +01:00
|
|
|
|
2009-01-19 18:51:57 +01:00
|
|
|
#ifdef ENABLE_SQLITE
|
|
|
|
#include "sticker.h"
|
|
|
|
#endif
|
|
|
|
|
2008-12-27 14:33:41 +01:00
|
|
|
#ifdef ENABLE_ARCHIVE
|
|
|
|
#include "archive_list.h"
|
|
|
|
#endif
|
|
|
|
|
2008-10-28 20:33:56 +01:00
|
|
|
#include <glib.h>
|
|
|
|
|
2008-12-29 17:28:32 +01:00
|
|
|
#include <unistd.h>
|
|
|
|
#include <stdlib.h>
|
|
|
|
#include <errno.h>
|
|
|
|
#include <string.h>
|
2008-12-29 17:43:00 +01:00
|
|
|
|
2009-01-05 09:31:09 +01:00
|
|
|
#ifdef HAVE_LOCALE_H
|
2008-11-05 18:37:39 +01:00
|
|
|
#include <locale.h>
|
|
|
|
#endif
|
|
|
|
|
2009-03-27 18:02:31 +01:00
|
|
|
#ifdef WIN32
|
|
|
|
#include <winsock2.h>
|
|
|
|
#include <ws2tcpip.h>
|
|
|
|
#endif
|
|
|
|
|
2009-01-18 17:32:43 +01:00
|
|
|
enum {
|
|
|
|
DEFAULT_BUFFER_SIZE = 2048,
|
|
|
|
DEFAULT_BUFFER_BEFORE_PLAY = 10,
|
|
|
|
};
|
|
|
|
|
2009-01-03 13:19:01 +01:00
|
|
|
GThread *main_task;
|
2008-12-30 19:50:22 +01:00
|
|
|
GMainLoop *main_loop;
|
|
|
|
|
2009-01-02 11:20:41 +01:00
|
|
|
struct notify main_notify;
|
|
|
|
|
2009-02-02 16:57:24 +01:00
|
|
|
/**
|
|
|
|
* Returns the database. If this function returns false, this has not
|
|
|
|
* succeeded, and the caller should create the database after the
|
|
|
|
* process has been daemonized.
|
|
|
|
*/
|
|
|
|
static bool
|
2009-02-02 16:58:51 +01:00
|
|
|
openDB(const Options *options)
|
2006-07-19 20:04:15 +02:00
|
|
|
{
|
2009-01-18 17:54:46 +01:00
|
|
|
const char *path = config_get_path(CONF_DB_FILE);
|
2009-02-02 16:57:24 +01:00
|
|
|
bool ret;
|
2009-03-02 15:42:21 +01:00
|
|
|
GError *error = NULL;
|
2009-01-18 16:09:01 +01:00
|
|
|
|
2009-01-18 16:56:07 +01:00
|
|
|
if (!mapper_has_music_directory()) {
|
2009-01-18 17:54:46 +01:00
|
|
|
if (path != NULL)
|
2009-01-18 16:56:07 +01:00
|
|
|
g_message("Found " CONF_DB_FILE " setting without "
|
|
|
|
CONF_MUSIC_DIR " - disabling database");
|
|
|
|
db_init(NULL);
|
2009-02-02 16:57:24 +01:00
|
|
|
return true;
|
2009-01-18 16:56:07 +01:00
|
|
|
}
|
|
|
|
|
2009-01-18 17:54:46 +01:00
|
|
|
if (path == NULL)
|
|
|
|
g_error(CONF_DB_FILE " setting missing");
|
|
|
|
|
|
|
|
db_init(path);
|
2009-01-04 21:18:16 +01:00
|
|
|
|
2009-02-02 16:57:24 +01:00
|
|
|
if (options->createDB > 0)
|
|
|
|
/* don't attempt to load the old database */
|
|
|
|
return false;
|
2009-01-04 21:18:16 +01:00
|
|
|
|
2009-03-02 15:42:21 +01:00
|
|
|
ret = db_load(&error);
|
2009-02-02 16:57:24 +01:00
|
|
|
if (!ret) {
|
2009-03-02 15:42:21 +01:00
|
|
|
g_warning("Failed to load database: %s", error->message);
|
|
|
|
g_error_free(error);
|
|
|
|
|
2009-02-02 16:58:51 +01:00
|
|
|
if (options->createDB < 0)
|
2008-12-29 17:35:40 +01:00
|
|
|
g_error("can't open db file and using "
|
2009-02-02 16:58:51 +01:00
|
|
|
"\"--no-create-db\" command line option");
|
2009-01-04 21:18:40 +01:00
|
|
|
|
|
|
|
if (!db_check())
|
2006-07-19 20:04:15 +02:00
|
|
|
exit(EXIT_FAILURE);
|
2009-01-04 21:18:16 +01:00
|
|
|
|
|
|
|
db_clear();
|
|
|
|
|
2009-02-02 16:57:24 +01:00
|
|
|
/* run database update after daemonization */
|
|
|
|
return false;
|
2006-07-19 20:04:15 +02:00
|
|
|
}
|
2009-02-02 16:57:24 +01:00
|
|
|
|
|
|
|
return true;
|
2004-06-02 06:05:09 +02:00
|
|
|
}
|
2004-02-24 00:41:20 +01:00
|
|
|
|
2009-03-27 18:02:31 +01:00
|
|
|
/**
|
|
|
|
* Windows-only initialization of the Winsock2 library.
|
|
|
|
*/
|
|
|
|
#ifdef WIN32
|
|
|
|
static void winsock_init(void)
|
|
|
|
{
|
|
|
|
WSADATA sockinfo;
|
|
|
|
int retval;
|
|
|
|
|
|
|
|
retval = WSAStartup(MAKEWORD(2, 2), &sockinfo);
|
|
|
|
if(retval != 0)
|
|
|
|
{
|
|
|
|
g_error("Attempt to open Winsock2 failed; error code %d\n",
|
|
|
|
retval);
|
|
|
|
}
|
|
|
|
|
|
|
|
if (LOBYTE(sockinfo.wVersion) != 2)
|
|
|
|
{
|
|
|
|
g_error("We use Winsock2 but your version is either too new or "
|
|
|
|
"old; please install Winsock 2.x\n");
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
2009-01-18 17:32:43 +01:00
|
|
|
/**
|
|
|
|
* Initialize the decoder and player core, including the music pipe.
|
|
|
|
*/
|
|
|
|
static void
|
|
|
|
initialize_decoder_and_player(void)
|
|
|
|
{
|
2009-01-25 16:03:49 +01:00
|
|
|
const struct config_param *param;
|
2009-01-18 17:32:43 +01:00
|
|
|
char *test;
|
|
|
|
size_t buffer_size;
|
|
|
|
float perc;
|
|
|
|
unsigned buffered_chunks;
|
|
|
|
unsigned buffered_before_play;
|
|
|
|
|
|
|
|
param = config_get_param(CONF_AUDIO_BUFFER_SIZE);
|
|
|
|
if (param != NULL) {
|
|
|
|
buffer_size = strtol(param->value, &test, 10);
|
|
|
|
if (*test != '\0' || buffer_size <= 0)
|
|
|
|
g_error("buffer size \"%s\" is not a positive integer, "
|
|
|
|
"line %i\n", param->value, param->line);
|
|
|
|
} else
|
|
|
|
buffer_size = DEFAULT_BUFFER_SIZE;
|
|
|
|
|
|
|
|
buffer_size *= 1024;
|
|
|
|
|
|
|
|
buffered_chunks = buffer_size / CHUNK_SIZE;
|
|
|
|
|
|
|
|
if (buffered_chunks >= 1 << 15)
|
|
|
|
g_error("buffer size \"%li\" is too big\n", (long)buffer_size);
|
|
|
|
|
|
|
|
param = config_get_param(CONF_BUFFER_BEFORE_PLAY);
|
|
|
|
if (param != NULL) {
|
|
|
|
perc = strtod(param->value, &test);
|
|
|
|
if (*test != '%' || perc < 0 || perc > 100) {
|
2009-03-15 18:23:00 +01:00
|
|
|
g_error("buffered before play \"%s\" is not a positive "
|
|
|
|
"percentage and less than 100 percent, line %i",
|
|
|
|
param->value, param->line);
|
2009-01-18 17:32:43 +01:00
|
|
|
}
|
|
|
|
} else
|
|
|
|
perc = DEFAULT_BUFFER_BEFORE_PLAY;
|
|
|
|
|
|
|
|
buffered_before_play = (perc / 100) * buffered_chunks;
|
|
|
|
if (buffered_before_play > buffered_chunks)
|
|
|
|
buffered_before_play = buffered_chunks;
|
|
|
|
|
2009-03-06 00:42:03 +01:00
|
|
|
pc_init(buffered_chunks, buffered_before_play);
|
2009-01-18 17:32:43 +01:00
|
|
|
dc_init();
|
|
|
|
}
|
|
|
|
|
2009-01-01 18:22:11 +01:00
|
|
|
/**
|
|
|
|
* event_pipe callback function for PIPE_EVENT_IDLE
|
|
|
|
*/
|
|
|
|
static void
|
|
|
|
idle_event_emitted(void)
|
2008-12-30 19:24:39 +01:00
|
|
|
{
|
|
|
|
/* send "idle" notificaions to all subscribed
|
|
|
|
clients */
|
2009-01-01 18:22:11 +01:00
|
|
|
unsigned flags = idle_get();
|
2008-12-30 19:24:39 +01:00
|
|
|
if (flags != 0)
|
|
|
|
client_manager_idle_add(flags);
|
|
|
|
}
|
|
|
|
|
2006-07-19 20:04:15 +02:00
|
|
|
int main(int argc, char *argv[])
|
|
|
|
{
|
|
|
|
Options options;
|
2006-08-07 22:49:20 +02:00
|
|
|
clock_t start;
|
2009-02-02 16:57:24 +01:00
|
|
|
bool create_db;
|
2009-07-06 22:48:34 +02:00
|
|
|
#ifdef ENABLE_SQLITE
|
2009-07-05 08:29:47 +02:00
|
|
|
bool success;
|
|
|
|
GError *error = NULL;
|
2009-07-06 22:48:34 +02:00
|
|
|
#endif
|
2004-06-02 06:05:09 +02:00
|
|
|
|
2008-12-30 16:28:13 +01:00
|
|
|
daemonize_close_stdin();
|
|
|
|
|
2009-01-05 09:31:09 +01:00
|
|
|
#ifdef HAVE_LOCALE_H
|
2008-11-05 18:37:39 +01:00
|
|
|
/* initialize locale */
|
|
|
|
setlocale(LC_CTYPE,"");
|
|
|
|
#endif
|
|
|
|
|
2008-11-05 18:21:49 +01:00
|
|
|
/* enable GLib's thread safety code */
|
|
|
|
g_thread_init(NULL);
|
|
|
|
|
2009-03-27 18:02:31 +01:00
|
|
|
#ifdef WIN32
|
|
|
|
winsock_init();
|
|
|
|
#endif
|
2008-12-28 21:02:14 +01:00
|
|
|
idle_init();
|
2008-12-28 21:02:30 +01:00
|
|
|
dirvec_init();
|
2008-12-28 21:02:42 +01:00
|
|
|
songvec_init();
|
2008-12-28 22:09:42 +01:00
|
|
|
tag_pool_init();
|
2009-01-17 20:23:27 +01:00
|
|
|
config_global_init();
|
2004-06-02 06:05:09 +02:00
|
|
|
|
2006-07-19 20:04:15 +02:00
|
|
|
parseOptions(argc, argv, &options);
|
2004-06-02 06:05:09 +02:00
|
|
|
|
2009-01-18 18:29:27 +01:00
|
|
|
daemonize_init(config_get_string(CONF_USER, NULL),
|
|
|
|
config_get_path(CONF_PID_FILE));
|
|
|
|
|
2006-07-19 20:04:15 +02:00
|
|
|
if (options.kill)
|
2009-01-18 17:15:34 +01:00
|
|
|
daemonize_kill();
|
2005-03-09 04:13:33 +01:00
|
|
|
|
2009-01-18 15:22:26 +01:00
|
|
|
stats_global_init();
|
2008-08-29 09:38:21 +02:00
|
|
|
tag_lib_init();
|
2008-12-28 19:48:53 +01:00
|
|
|
log_init(options.verbose, options.stdOutput);
|
2006-07-19 20:04:15 +02:00
|
|
|
|
2009-02-24 17:42:36 +01:00
|
|
|
listen_global_init();
|
2006-07-19 20:04:15 +02:00
|
|
|
|
2009-01-18 17:15:34 +01:00
|
|
|
daemonize_set_user();
|
2004-06-02 06:05:09 +02:00
|
|
|
|
2009-01-03 13:19:01 +01:00
|
|
|
main_task = g_thread_self();
|
2008-12-30 19:24:39 +01:00
|
|
|
main_loop = g_main_loop_new(NULL, FALSE);
|
2009-01-02 11:20:41 +01:00
|
|
|
notify_init(&main_notify);
|
2008-12-30 19:24:39 +01:00
|
|
|
|
2009-01-01 18:22:11 +01:00
|
|
|
event_pipe_init();
|
|
|
|
event_pipe_register(PIPE_EVENT_IDLE, idle_event_emitted);
|
|
|
|
|
2008-11-05 18:21:52 +01:00
|
|
|
path_global_init();
|
2008-10-15 19:36:33 +02:00
|
|
|
mapper_init();
|
2006-08-06 08:40:11 +02:00
|
|
|
initPermissions();
|
2009-07-14 21:28:36 +02:00
|
|
|
playlist_global_init();
|
2009-01-25 13:53:16 +01:00
|
|
|
spl_global_init();
|
2008-12-27 14:33:41 +01:00
|
|
|
#ifdef ENABLE_ARCHIVE
|
2008-12-16 21:42:34 +01:00
|
|
|
archive_plugin_init_all();
|
2008-12-27 14:33:41 +01:00
|
|
|
#endif
|
2008-08-26 08:27:09 +02:00
|
|
|
decoder_plugin_init_all();
|
2008-11-27 19:34:54 +01:00
|
|
|
update_global_init();
|
2006-08-06 08:40:11 +02:00
|
|
|
|
2009-02-02 16:58:51 +01:00
|
|
|
create_db = !openDB(&options);
|
2006-08-06 08:40:11 +02:00
|
|
|
|
2009-01-19 18:51:57 +01:00
|
|
|
#ifdef ENABLE_SQLITE
|
2009-07-05 08:29:47 +02:00
|
|
|
success = sticker_global_init(config_get_path(CONF_STICKER_FILE),
|
|
|
|
&error);
|
|
|
|
if (!success)
|
|
|
|
g_error("%s", error->message);
|
2009-01-19 18:51:57 +01:00
|
|
|
#endif
|
|
|
|
|
2008-10-22 21:40:44 +02:00
|
|
|
command_init();
|
2009-01-18 17:32:43 +01:00
|
|
|
initialize_decoder_and_player();
|
2009-01-25 17:38:02 +01:00
|
|
|
volume_init();
|
2005-11-16 15:43:04 +01:00
|
|
|
initAudioConfig();
|
2009-02-10 18:51:51 +01:00
|
|
|
audio_output_all_init();
|
2008-08-28 20:03:02 +02:00
|
|
|
client_manager_init();
|
2008-11-11 15:55:34 +01:00
|
|
|
replay_gain_global_init();
|
2006-07-27 02:50:59 +02:00
|
|
|
initNormalization();
|
2008-10-26 20:34:47 +01:00
|
|
|
input_stream_global_init();
|
2006-07-21 19:48:54 +02:00
|
|
|
|
2009-01-18 18:29:30 +01:00
|
|
|
daemonize(options.daemon);
|
2005-11-16 15:43:04 +01:00
|
|
|
|
2006-08-01 06:18:53 +02:00
|
|
|
setup_log_output(options.stdOutput);
|
2004-06-02 06:05:09 +02:00
|
|
|
|
2006-08-06 08:40:11 +02:00
|
|
|
initSigHandlers();
|
2005-11-18 13:09:05 +01:00
|
|
|
|
2007-06-04 19:41:18 +02:00
|
|
|
initZeroconf();
|
|
|
|
|
2008-08-26 08:27:09 +02:00
|
|
|
player_create();
|
2009-01-18 18:09:50 +01:00
|
|
|
|
2009-02-02 16:57:24 +01:00
|
|
|
if (create_db) {
|
|
|
|
/* the database failed to load, or MPD was started
|
|
|
|
with --create-db: recreate a new database */
|
|
|
|
unsigned job = directory_update_init(NULL);
|
|
|
|
if (job == 0)
|
|
|
|
g_error("directory update failed");
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2009-01-18 18:09:50 +01:00
|
|
|
state_file_init(config_get_path(CONF_STATE_FILE));
|
2005-08-23 14:01:37 +02:00
|
|
|
|
2009-06-19 09:02:14 +02:00
|
|
|
config_global_check();
|
|
|
|
|
2008-12-30 19:24:39 +01:00
|
|
|
/* run the main loop */
|
2008-10-14 22:38:14 +02:00
|
|
|
|
2008-12-30 19:24:39 +01:00
|
|
|
g_main_loop_run(main_loop);
|
2008-11-21 18:36:33 +01:00
|
|
|
|
2008-12-30 19:24:39 +01:00
|
|
|
/* cleanup */
|
|
|
|
|
|
|
|
g_main_loop_unref(main_loop);
|
2004-02-24 00:41:20 +01:00
|
|
|
|
2009-01-18 18:09:50 +01:00
|
|
|
state_file_finish();
|
2006-08-06 08:40:11 +02:00
|
|
|
playerKill();
|
2007-01-11 21:41:17 +01:00
|
|
|
finishZeroconf();
|
2008-08-28 20:03:02 +02:00
|
|
|
client_manager_deinit();
|
2009-02-24 17:42:36 +01:00
|
|
|
listen_global_finish();
|
2009-07-14 21:28:36 +02:00
|
|
|
playlist_global_finish();
|
2006-07-18 17:50:10 +02:00
|
|
|
|
2006-08-07 22:49:20 +02:00
|
|
|
start = clock();
|
2008-10-08 11:07:55 +02:00
|
|
|
db_finish();
|
2008-12-29 17:35:40 +01:00
|
|
|
g_debug("db_finish took %f seconds",
|
|
|
|
((float)(clock()-start))/CLOCKS_PER_SEC);
|
2006-07-18 17:50:10 +02:00
|
|
|
|
2009-01-19 18:51:57 +01:00
|
|
|
#ifdef ENABLE_SQLITE
|
|
|
|
sticker_global_finish();
|
|
|
|
#endif
|
|
|
|
|
2009-01-10 18:55:28 +01:00
|
|
|
notify_deinit(&main_notify);
|
2009-01-01 18:12:14 +01:00
|
|
|
event_pipe_deinit();
|
2008-09-24 07:14:11 +02:00
|
|
|
|
2008-10-26 19:30:13 +01:00
|
|
|
input_stream_global_finish();
|
2006-07-27 02:50:59 +02:00
|
|
|
finishNormalization();
|
2009-02-10 18:51:51 +01:00
|
|
|
audio_output_all_finish();
|
2006-07-19 20:04:15 +02:00
|
|
|
finishAudioConfig();
|
2008-12-31 16:46:41 +01:00
|
|
|
volume_finish();
|
2008-10-15 19:36:33 +02:00
|
|
|
mapper_finish();
|
2008-11-05 18:21:52 +01:00
|
|
|
path_global_finish();
|
2004-02-24 00:41:20 +01:00
|
|
|
finishPermissions();
|
2008-09-24 07:14:11 +02:00
|
|
|
dc_deinit();
|
|
|
|
pc_deinit();
|
2008-10-22 21:40:44 +02:00
|
|
|
command_finish();
|
2008-11-27 19:34:54 +01:00
|
|
|
update_global_finish();
|
2008-08-26 08:27:09 +02:00
|
|
|
decoder_plugin_deinit_all();
|
2008-12-27 14:33:41 +01:00
|
|
|
#ifdef ENABLE_ARCHIVE
|
2008-12-16 21:42:34 +01:00
|
|
|
archive_plugin_deinit_all();
|
2008-12-27 14:33:41 +01:00
|
|
|
#endif
|
2009-01-17 20:23:27 +01:00
|
|
|
config_global_finish();
|
2008-12-28 22:09:42 +01:00
|
|
|
tag_pool_deinit();
|
2008-12-28 21:02:42 +01:00
|
|
|
songvec_deinit();
|
2008-12-28 21:02:30 +01:00
|
|
|
dirvec_deinit();
|
2008-12-28 21:02:14 +01:00
|
|
|
idle_deinit();
|
2009-01-18 15:40:53 +01:00
|
|
|
stats_global_finish();
|
2009-01-18 18:29:27 +01:00
|
|
|
daemonize_finish();
|
2009-03-27 18:02:31 +01:00
|
|
|
#ifdef WIN32
|
|
|
|
WSACleanup();
|
|
|
|
#endif
|
2006-07-19 20:04:15 +02:00
|
|
|
|
2006-08-01 06:18:53 +02:00
|
|
|
close_log_files();
|
2006-07-19 20:04:15 +02:00
|
|
|
return EXIT_SUCCESS;
|
2004-02-24 00:41:20 +01:00
|
|
|
}
|