- 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.
-
- 10 Oct, 2008 2 commits
-
-
Max Kellermann authored
player_get_audio_format() replaces getPlayerSampleRate(), getPlayerBits(), getPlayerChannels().
-
Max Kellermann authored
This replaces the attributes bits, channels, sampleRate.
-
- 09 Oct, 2008 4 commits
-
-
Max Kellermann authored
Since the return value cannot be -1 anymore, we can make it unsigned.
-
Max Kellermann authored
The documentation for directory_update_init() was incorrect: a job ID must be positive, not non-negative. If the update queue is full and no job was created, it makes more sense to return 0 instead of -1, because it is more consistent with the return value of isUpdatingDB().
-
Max Kellermann authored
Remove clutter from directory.c. Everything which saves or loads to/from the hard disk goes to directory_save.c, and code which sends directory information to the client is moved into directory_print.c.
-
Qball Cow authored
With commit 6dcd7fea (if I am not mistaken) the error returned when you try to save to an existing playlist is wrong. Instead of MPD_ACK_ERROR_EXIST, MPD_ACK_ERROR_NO_EXIST is returned. This is obviously wrong and breaks gmpc.
-
- 08 Oct, 2008 4 commits
-
-
Max Kellermann authored
Yet another CamelCase removal patch.
-
Max Kellermann authored
The same can be achieved with directory_print(db_get_directory()).
-
Max Kellermann authored
Taming the directory.c monster, part II: move the database management stuff to database. directory.c should only contain code which works on directory objects.
-
Max Kellermann authored
The source directory.c mixes several libraries: directory object management, database management and database update, resulting in a 1000+ line monster. Move the whole database update code to update.c.
-
- 06 Oct, 2008 3 commits
-
-
Eric Wong authored
This got broken when listHandlerFunc was removed. Since we no longer need it and it's confusing, remove processCommandInternal and just use process_command.
-
Eric Wong authored
commands should really not behave differently if they're issued inside a command list or not; so stop having special handler functions to deal with them. "update" was the only command that used this functionality and I changed that in the last commit to serialize access.
-
Eric Wong authored
Now the "update" command can be issued multiple times regardless of whether the client is in list mode or not. We serialize the update tasks to prevent updates from trampling over each other and will spawn another update task once the current one is finished updating and reaped. Right now we cap the queue size to 32 which is probably enough (I bet most people usually run update with no argument anyways); but we can make it grow/shrink dynamically if needed. There'll still be a hard-coded limit to prevent DoS attacks, though.
-
- 29 Sep, 2008 2 commits
-
-
Max Kellermann authored
Do full C99 integer type conversion in all modules which were not touched by Eric's merged patch.
-
Eric Wong authored
This only breaks "update" under list command mode and no other commands. This can be done more optimally without the extra heap allocation via xstrdup(); but is uncommon enough to not matter.
-
- 25 Sep, 2008 1 commit
-
-
Max Kellermann authored
Due to a merge error, I broke the function handleUpdate(). It did not do anything for the global update, and it did not send a proper response to the client. This patch fixes both bugs.
-
- 23 Sep, 2008 2 commits
-
-
Max Kellermann authored
With patch 8d2830b3, I broke "addid": it did not return the id of the new song, because of a typo in the return condition (== instead of !=).
-
Eric Wong authored
A lot of the preparation was needed (and done in previous months) in making update thread-safe, but here it is. This was the first thing I made work inside a thread when I started mpd-uclinux many years ago, and also the last thing I've done in mainline mpd to work inside a thread, go figure.
-
- 07 Sep, 2008 21 commits
-
-
Max Kellermann authored
print_playlist_result() had an assert(0) at the end, in case there was an invalid result value. With NDEBUG, this resulted in a function not returning a value - add a dummy "return -1" at the end to keep gcc quiet.
-
Max Kellermann authored
Don't pass a pointer to client->permission to processCommand(), better let the code in command.c use the new permission getter/setter functions.
-
Max Kellermann authored
Some functions don't want to modify a client's permission set. Pass the permissions to them by value, not by reference.
-
Max Kellermann authored
Pass the client struct instead.
-
Max Kellermann authored
Pass the client struct instead of the raw file descriptor.
-
Max Kellermann authored
Pass the client struct instead of the raw file descriptor.
-
Max Kellermann authored
Pass the client struct instead of the raw file descriptor.
-
Max Kellermann authored
String literals (including those defined in CPP macros) can be concatenated at compile time. This saves some CPU cycles in vsnprintf() at run time.
-
Max Kellermann authored
commandError() has been superseded by command_error(), and is not being used anymore. Remove it.
-
Max Kellermann authored
The function loadPlaylist() wants to report incremental errors to the client, for this reason we cannot remove its protocol dependency right now. Instead, make it use the client struct instead of the raw file descriptor.
-
Max Kellermann authored
Don't pass the raw file descriptor around. This migration patch is rather large, because all of the sources have inter dependencies - we have to change all of them at the same time.
-
Max Kellermann authored
Pass the client struct to CommandHandlerFunction and CommandListHandlerFunction. Most commands cannot take real advantage of that yet, since most of them still work with the raw file descriptor.
-
Max Kellermann authored
Instead of passing the file descriptor, pass the client struct to getCommandEntryAndCheckArgcAndPermission().
-
Max Kellermann authored
These two functions take a client struct instead of the file descriptor. We will now begin passing the client struct around instead of a raw file descriptor (which needed a linear lookup in the client list to be useful).
-
Max Kellermann authored
No protocol code in the audio output library.
-
Max Kellermann authored
The "volume" library shouldn't talk to the client. Move error handling to command.c.
-
Max Kellermann authored
Again, move error handling to command.c.
-
Max Kellermann authored
Move another ocurrence of error handling over to command.c.
-
Max Kellermann authored
This patch continues the work of the previous patch: don't pass a file descriptor at all to traverseAllIn(). Since this fd was only used to report "directory not found" errors, we can easily move that check to the caller. This is a great relief, since it removes the dependency on a client connection from a lot of enumeration functions.
-
Max Kellermann authored
Continuing the effort of removing protocol specific calls from the core libraries: let the command.c code call commandError() based on PlaylistInfo's return value.
-
Max Kellermann authored
Return an "enum playlist_result" value instead of calling commandError() in storedPlaylist.c.
-