- 30 Jan, 2009 1 commit
-
-
Max Kellermann authored
When we do not explicitly catch G_IO_ERR and G_IO_HUP, GLib can go into an infinite loop, because it won't deliver the socket error to MPD.
-
- 25 Jan, 2009 3 commits
-
-
Max Kellermann authored
GIOChannel is more portable than raw read()/write() calls. We're using GIOChannel anyway, because we need it for plugging the client into the GLib main loop. Configure the GIOChannel to the bare minimum: no character set, no buffering.
-
Max Kellermann authored
Use g_io_channel_win32_new_socket() instead of g_io_channel_unix_new() on WIN32.
-
Max Kellermann authored
On some platforms, g_free() must be used for memory allocated by GLib. This patch intends to correct a lot of occurrences, but is probably not complete.
-
- 21 Jan, 2009 1 commit
-
-
Max Kellermann authored
Simplify some code by using config_get_positive(), instead of doing manual parsing and validation each time.
-
- 17 Jan, 2009 1 commit
-
-
Max Kellermann authored
Renamed functions, types, variables.
-
- 10 Jan, 2009 1 commit
-
-
Max Kellermann authored
-
- 08 Jan, 2009 1 commit
-
-
Max Kellermann authored
-
- 07 Jan, 2009 1 commit
-
-
Max Kellermann authored
Get rid of the non-portable Linux list library, part I.
-
- 03 Jan, 2009 2 commits
-
-
Max Kellermann authored
-
Max Kellermann authored
The length of GREETING is known at compile time, don't use strlen().
-
- 01 Jan, 2009 1 commit
-
-
Max Kellermann authored
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.
-
- 31 Dec, 2008 1 commit
-
-
Max Kellermann authored
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.
-
- 30 Dec, 2008 3 commits
-
-
Max Kellermann authored
Remove the event source from the GMainLoop object in client_set_expired().
-
Max Kellermann authored
Other libraries may need to access the main_loop reference, to add or remove events, or to call g_main_loop_quit().
-
Max Kellermann authored
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.
-
- 29 Dec, 2008 2 commits
-
-
Max Kellermann authored
On Windows, socket declarations reside in winsock.h and ws2tcpip.h. The POSIX headers sys/socket.h etc. are not available.
-
Max Kellermann authored
-
- 24 Dec, 2008 1 commit
-
-
Max Kellermann authored
When a response is very long (e.g. a large playlist > 100k songs), most of it will end up in the deferred buffers. Filling the deferred queue is very expensive currently, because a new buffer is allocated for every client_write() operation. This may lead to long delays, and the client might give up and disconnect meanwhile. This patch makes MPD attempt to flush the deferred queue as often as possible, to work around this problem. Due to the MPD 0.14 code freeze, we should not optimize the buffering code now.
-
- 02 Dec, 2008 1 commit
-
-
Thomas Jansen authored
We want to remove gcc.h eventually. This takes care of all the G_GNUC_PRINTF macros.
-
- 24 Nov, 2008 1 commit
-
-
Thomas Jansen authored
-
- 22 Nov, 2008 1 commit
-
-
Marc Pavot authored
The client may provide the names of idle events as arguments to the "idle" command to inform MPD that it is only interested in these events.
-
- 31 Oct, 2008 5 commits
-
-
Max Kellermann authored
Return bool instead of int.
-
Max Kellermann authored
After a partial write, chances are vanishing that another write() will succeed. Don't try immediately.
-
Max Kellermann authored
Another custom data structore converted to GLib.
-
Max Kellermann authored
Replace a custom data structure with a GLib one.
-
Max Kellermann authored
The list cache aims to save memory allocations, and complicates the code a bit. We should rather use GLib slices later, which are easy to use.
-
- 22 Oct, 2008 1 commit
-
-
Max Kellermann authored
Eliminate CamelCase in all public and static functions.
-
- 17 Oct, 2008 7 commits
-
-
Max Kellermann authored
client->permission is a bit set, and should be unsigned.
-
Max Kellermann authored
Reduce two temporary variables to only one.
-
Max Kellermann authored
There is no sense in using the kernel's send buffer size (SO_SNDBUF) for MPD's send buffer. Convert it into a static buffer of 4 kB.
-
Max Kellermann authored
Use a literal in the struct declaration, and sizeof(client->buffer) everywhere else. Also shrink the buffer from 40 kB to 4 kB. The buffer must only be large enough to hold one line of input, and 4 kB is still more than enough.
-
Max Kellermann authored
The buffer pointers must not exceed the buffer size.
-
Max Kellermann authored
Use ssize_t instead of int.
-
Max Kellermann authored
Commit 6eb62e47 didn't obey partial lines correctly: when a line wasn't finished in one read, the first part was ignored when the rest arrived.
-
- 15 Oct, 2008 3 commits
-
-
Max Kellermann authored
Enable authentication over unix sockets. Store the client's uid in the client struct.
-
Max Kellermann authored
-
Max Kellermann authored
Use memchr() instead of manually traversing the input buffer. Update the client's properties after all commands have been processed. Check for buffer overflow once.
-
- 14 Oct, 2008 1 commit
-
-
Max Kellermann authored
"idle" waits until something noteworthy happens on the server, e.g. song change, playlist modified, database updated. This allows clients to keep up to date without polling.
-
- 08 Oct, 2008 1 commit
-
-
Max Kellermann authored
When there are standardized headers, use these instead of the bloated os_compat.h.
-