- 29 Aug, 2008 2 commits
-
-
Max Kellermann authored
And again, convert arguments to const.
-
Max Kellermann authored
client_defer_output() was modified so that it can create the deferred_send list. With this patch, the assertion on "deferred_send!=NULL" has become invalid. Remove it.
-
- 28 Aug, 2008 26 commits
-
-
Eric Wong authored
I'm really no fan of the warning log, it's too complex for how little it gets used; but fixing it is another problem.
-
Eric Wong authored
Warren hasn't been active in development in a while and probably doesn't have much time to answer user questions. So point the mailing contact to the public mailing lists where any developer can see and answer.
-
Max Kellermann authored
-
Max Kellermann authored
Why waste 4 bytes for a flag which we can hide in another variable.
-
Max Kellermann authored
Hiding this flag allows us later to remove it easily.
-
Max Kellermann authored
Unclutter the client_new() constructor by moving unrelated complex code into a separate function.
-
Max Kellermann authored
The last patch removed the "continue" directive, and now the while loop is without function. Remove it. Also make client_manager_io() return 0.
-
Max Kellermann authored
Previously, when select() failed, we assumed that there was an invalid file descriptor in one of the client structs. Thus we tried select() one by one. This is bogus, because we should never have invalid file descriptors. Remove it, and make select() errors fatal.
-
Max Kellermann authored
Eliminate duplicated code, call client_defer_output() which we splitted from client_write_output() earlier.
-
Max Kellermann authored
Move the second part of client_write_output() into a separate function.
-
Max Kellermann authored
client_defer_output() was designed to add new buffers to an existing deferred_send buffer. Tweak it and allow it to create a new buffer list.
-
Max Kellermann authored
Exit the function when an error occurs, and move the rest of the following code one indent level left.
-
Max Kellermann authored
Split the large function client_write_output() into two parts; this is the first code moving patch.
-
Max Kellermann authored
All of the client's resources are freed in client_close(). It is enough to set the "expired" flag, no need to duplicate lots of destruction code again and again.
-
Max Kellermann authored
Due to the large buffers in the client struct, the static client array eats several megabytes of RAM with a maximum of only 10 clients. Stop this waste and allocate each client struct from the heap.
-
Max Kellermann authored
The code becomes less complex and more readable when we move this linear search into a separate mini function.
-
Max Kellermann authored
This saves one level of indent.
-
Max Kellermann authored
Functions which operate on the whole client list are prefixed with "client_manager_", and functions which handle just one client just get "client_".
-
Max Kellermann authored
Rename all static functions, variables and macros which have "interface" in their name to something nicer prefixed with "client_".
-
Max Kellermann authored
Second patch: rename the internal struct name. We will eventually export this type as an opaque forward-declared struct later, so we can pass a struct pointer instead of a file descriptor, which would save us an expensive linear lookup.
-
Max Kellermann authored
I don't believe "interface" is a good name for something like "connection by a client to MPD", let's call it "client". This is the first patch in the series which changes the name, beginning with the file name.
-
Max Kellermann authored
linux/list.h is a nice doubly linked list library - it is lightweight and powerful at the same time. It will be useful later, when we begin to allocate client structures dynamically. Import it, and strip out all the stuff which we are not going to use.
-
Max Kellermann authored
The usual bunch of pointer arguments which should be const.
-
Max Kellermann authored
Use "unsigned int" whenever negative values are not meaningful. Use size_t whenever we are going to describe buffer sizes.
-
Max Kellermann authored
Only include headers which are really needed.
-
Max Kellermann authored
-
- 26 Aug, 2008 12 commits
-
-
Max Kellermann authored
-
Max Kellermann authored
-
Max Kellermann authored
Give player.c a better name, meaning that the code is used to control the player thread.
-
Max Kellermann authored
We should avoid having protocol specific code in player.c. Just return success or failure, and let the caller send the error code to the MPD client.
-
Max Kellermann authored
-
Max Kellermann authored
-
Max Kellermann authored
-
Max Kellermann authored
It should be obvious in which thread or context a function is being executed at runtime. The code which was left in decode.c is for the decoder thread itself; give the file a better name.
-
Max Kellermann authored
This is the last of the three variables. Now we don't need playerData.h anymore in most sources.
-
Max Kellermann authored
This releases several include file dependencies. As a side effect, "CHUNK_SIZE" isn't defined by decoder_api.h anymore, so we have to define it directly in the plugins which need it. It just isn't worth it to add it to the decoder plugin API.
-
Max Kellermann authored
The decoder plugins need this type, so export it in the public API. This allows is to remove "decode.h" from "decoder_api.h", uncluttering the API namespace some more.
-
Max Kellermann authored
Now that "dc" is available here, we don't have to pass it to decoder_is_idle() and decoder_is_starting() anymore.
-