aboutsummaryrefslogtreecommitdiffstats
path: root/src (unfollow)
Commit message (Collapse)AuthorFilesLines
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
2008-12-29tag_id3: use GLib loggingMax Kellermann1-12/+19
2008-12-29listen: use GLib loggingMax Kellermann1-29/+32
2008-12-29utils: use GLib loggingMax Kellermann1-14/+13
2008-12-29client: use GLib loggingMax Kellermann1-48/+53
2008-12-29pcm: use GLib loggingMax Kellermann4-67/+76
2008-12-29database: use GLib loggingMax Kellermann1-36/+38
2008-12-29log: automatically append newlineMax Kellermann1-4/+19
If a log message does not include a newline character, append it.
2008-12-29removed os_compat.hMax Kellermann30-103/+99
Only include headers which are really needed. os_compat.h aimed to make MPD easily portable, but was never actually made portable.
2008-12-29command: use gmtime() on WIN32Max Kellermann1-1/+8
gmtime_r() is not available.
2008-12-29condition: removed cond_timedwait() and cond_signal_async()Max Kellermann2-38/+0
These methods are unused.
2008-12-29tag_id3: strip leading and trailing whitespace from ID3 tagsThomas Jansen1-2/+6
Fix for bug #1491.
2008-12-29mp4: support the writer/composer tagFrank Mulder1-0/+2
I tried to search for a certain composer in my collection, but only non-mp4 files showed up. The source code reveals that this tag is not read. This can be fixed by reading the 'Writer' tag field, in mp4_plugin.c, in function mp4_load_tag. I actually tried this, and after compiling with those lines added, also mp4 (.m4a) files showed up when searching for a composer.
2008-12-29update: fixing empty filenames in archivesViliam Mateicka2-1/+8
2008-12-28osx_plugin: migrate from pthread to glib threadsThomas Jansen1-19/+18
2008-12-28output: migrate from pthread to glib threadsThomas Jansen4-12/+9