aboutsummaryrefslogtreecommitdiffstats
path: root/src (unfollow)
Commit message (Collapse)AuthorFilesLines
2009-01-01main_notify: renamed source to event_pipe.cMax Kellermann10-12/+12
We are going to migrate away from the concept of notifying the main thread. There should be events sent to it instead. This patch starts a series to implement that.
2009-01-01gcc.h: removed all duplicate macrosMax Kellermann1-16/+0
Removed all macros which are already provided by GLib.
2009-01-01decoder plugins: don't include gcc.hMax Kellermann5-12/+17
Use GLib's G_GNUC_UNUSED instead of gcc.h's mpd_unused.
2009-01-01output plugins: don't include gcc.hMax Kellermann9-24/+29
Use GLib's G_GNUC_UNUSED instead of gcc.h's mpd_unused.
2009-01-01null: don't include gcc.hMax Kellermann1-4/+7
Use GLib's G_GNUC_UNUSED instead of macros from gcc.h.
2008-12-31Moving mixers to audio outputsViliam Mateicka13-433/+649
2008-12-31exporting functionsViliam Mateicka4-3/+9
2008-12-31client: run client_manager_expire() in an idle eventMax Kellermann3-3/+22
With the GLib main loop, the client manager can install its own event in case a client is expired. No need for main.c to call client_manager_expire() manually.
2008-12-31ls.c: include config.h to have HAVE_CURL hereLaszlo Ashin1-0/+1
2008-12-31main_notify: removed lock()/unlock()Max Kellermann2-14/+0
These functions are not used anymore since we use the GLib main loop.
2008-12-31client: remember GLib source idMax Kellermann1-9/+14
Remove the event source from the GMainLoop object in client_set_expired().
2008-12-30sig_handlers: call g_main_loop_quit() in SIGTERM handlerMax Kellermann1-8/+21
We don't need to use asynchronous events to quit MPD, we can just call g_main_loop_quit() inside the handler.
2008-12-30main: export the main_loop variableMax Kellermann4-2/+29
Other libraries may need to access the main_loop reference, to add or remove events, or to call g_main_loop_quit().
2008-12-30sig_handlers: removed SIGCHLDMax Kellermann1-18/+0
We have no child processes anymore. Remove the SIGCHLD handler.
2008-12-30sig_handlers: don't reload database on SIGHUPMax Kellermann1-7/+0
The SIGHUP handler was used by the update process to make the main process re-read the database. We don't need this anymore, since the update takes place in a thread now.
2008-12-30sig_handlers: removed unused functionsMax Kellermann4-69/+0
Most of these functions were obsoleted when we switched to threaded MPD.
2008-12-30main: use the GLib main loopMax Kellermann12-567/+173
This is a rather huge patch, which unfortunately cannot be splitted. Instead of using our custom ioops.h library, convert everything to use the GLib main loop.
2008-12-30main_notify: make the read side of the pipe blockingMax Kellermann3-27/+6
Currently, both sides of the pipe are blocking, although we do not need blocking read(). Convert it back to blocking. Eliminate the select() from wait_main_task().
2008-12-30main_notify: removed notify object, use only pipeMax Kellermann1-34/+17
To wake up the main thread, don't attempt to use a GCond/GMutex (struct notify). This kind of mixed wakeup method has known race conditions. The idea behind this patch is: for wakeups which happen while the main thread is sleeping, use only a pipe. For wakeups which happen while the main thread is waiting for the player thread, we can later change to GCond. For now, accept the overhead of using a pipe for the latter. In the long run, the main thread will never wait for the player thread, but will do everything asynchronously.
2008-12-30listen: don't make the server socket non-blockingMax Kellermann1-7/+1
There is no point in making the server socket non-blocking. We call accept() only after select() has notified us about a new connection.
2008-12-30utils: port set_nonblocking() to WIN32Max Kellermann1-0/+6
The new WIN32 version of set_nonblocking() can only deal with sockets, i.e. it will fail on main_notify.c. On WIN32, we have to reimplement main_notify.c anyway, so this is not a big deal.
2008-12-30command: don't allow adding local files on WIN32Max Kellermann3-0/+8
There are no unix sockets on WIN32, and therefore no authentication. WIN32 might have similar capabilities, but until we implement them, disable that MPD feature.
2008-12-30utils: implement my_usleep() with Sleep() on WIN32Max Kellermann1-0/+8
Sleep() has only millisecond granularity, but good enough for now.
2008-12-30listen: include winsock headers on WIN32Max Kellermann1-0/+6
On Windows, socket declarations reside in winsock.h and ws2tcpip.h. The POSIX headers are not available.
2008-12-30bonjour: fixed "unused parameter" warningsMax Kellermann1-7/+13
Add G_GNUC_UNUSED attributes.
2008-12-30zeroconf: eliminated strlen() usage from initZeroconf()Max Kellermann1-3/+1
To test if a string is empty, we can just see if the first byte is 0. No need to include string.h for strlen() here.
2008-12-30zeroconf: moved code to zeroconf-avahi.c and zeroconf-bonjour.cMax Kellermann5-556/+647
Moved implementation specific code to their own sources, internal declarations in zeroconf-internal.h.
2008-12-30zeroconf: fail if avahi service name is invalidMax Kellermann1-8/+4
If the configured avahi service name is invalid, abort MPD. Don't fall back to the default service name.
2008-12-30playlist: use GLib's random number generatorMax Kellermann1-7/+10
srandom() and random() are not portable. Use GLib's implementation.
2008-12-30daemon: simplified daemonize_close_stdin()Max Kellermann1-16/+6
Don't bother to call fstat() or isatty() on STDIN_FILENO.
2008-12-30listen: moved redirect_stdin() to daemon.cMax Kellermann4-29/+34
redirect_stdin() is a daemonization function, and disconnecting from the standard input is always a good idea for MPD.
2008-12-30main: moved daemonize() to daemon.cMax Kellermann4-59/+116
2008-12-30listen: eliminated freeAllListenSockets()Max Kellermann2-5/+0
Merged freeAllListenSockets() into closeAllListenSockets(), because this is its only caller.
2008-12-30print supported decoders in --versionViliam Mateicka3-0/+19
2008-12-29main: disable non-portable code on WIN32Max Kellermann1-0/+14
Disable changeToUser(), daemonize(), killFromPidFile().
2008-12-29utils: implement parsePath() with g_strdup() on WIN32Max Kellermann1-2/+10
On WIN32, parsePath() now simply duplicates the input string. There is currently nothing special we can do here. The old code was not portable on WIN32.
2008-12-29utils: use g_get_home_dir()Max Kellermann1-6/+4
Use g_get_home_dir() to get the home directory of the current user. This will be portable to win32.
2008-12-29utils: make variables more local in parsePath()Max Kellermann1-16/+22
Declare variables where they are really used.
2008-12-29client: include winsock headers on WIN32Max Kellermann2-3/+9
On Windows, socket declarations reside in winsock.h and ws2tcpip.h. The POSIX headers sys/socket.h etc. are not available.
2008-12-29main: use g_setenv() instead of setenv()Max Kellermann1-42/+1
Removed the fallback setenv() implementation for solaris.
2008-12-29log: removed unused logging wrappersMax Kellermann2-8/+0
Removed GLib logging wrappers which are not used anymore.
2008-12-29main: use GLib loggingMax Kellermann1-33/+34
2008-12-29path: use GLib loggingMax Kellermann1-5/+7
2008-12-29update: use GLib loggingMax Kellermann1-18/+21
2008-12-29alsa: use GLib loggingMax Kellermann1-29/+30
2008-12-29jack: use GLib loggingMax Kellermann1-28/+30
2008-12-29fifo: use GLib loggingMax Kellermann1-21/+24
2008-12-29state_file: use GLib loggingMax Kellermann1-8/+10
2008-12-29volume: use GLib loggingMax Kellermann1-26/+29
2008-12-29player_thread: use GLib loggingMax Kellermann1-8/+10