| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
| |
To find out whether a file exists, use g_file_test() instead of
stat(), because it is more portable and easier to use.
|
|
|
|
| |
Don't pass a static buffer to map_spl_utf8_to_fs().
|
|
|
|
|
| |
Only include headers which are really needed. os_compat.h aimed to
make MPD easily portable, but was never actually made portable.
|
|
|
|
| |
Replaced myFgets() with fgets() + g_strchomp().
|
|
|
|
|
|
|
| |
With a large maximum playlist length, the integer multiplication
"playlist_max_length * MPD_PATH_MAX" may overflow. Change that to a
division. This was not a dangerous bug, since it was only used for
a quick estimate.
|
|
|
|
|
| |
The function didn't do anything useful, it was just several lines
obfuscating that it was only forwarding isRemoteUrl()'s return value.
|
|
|
|
|
| |
Added the function map_spl_utf8_to_fs() which replaces
utf8_to_fs_playlist_path().
|
|
|
|
| |
Cast playlist_max_length to off_t before comparing it to stat.st_size.
|
|
|
|
| |
The "rm" command did not send notifications to idle clients. Add it.
|
|
|
|
| |
The function deletePlaylist() shouldn't be in playlist.c.
|
|
|
|
|
| |
Don't use our deprecated linked list library, use GLib's GPtrArray
instead.
|
|
|
|
|
|
| |
Pass index arguments as unsigned integers. They must not be negative,
and even if some caller accidently passes -1, it won't pass the bound
checks (since it's now 2**32-1).
|
|
|
|
|
|
| |
spl_list() provides an interface for enumerating all stored playlists.
This separates the internal playlist logic from the protocol specific
function lsPlaylists().
|
|
|
|
|
| |
The return value of spl_append_uri() was somewhat buggy: some branches
returned ACK_* values, and some an enum playlist_result. Unify this.
|
|
|
|
|
| |
Rename addToStoredPlaylist() to spl_append_uri(), and remove the
clearStoredPlaylist() macro.
|
|
|
|
|
|
| |
The two functions clearStoredPlaylist() and addToStoredPlaylist()
don't belong into playlist.c. clearStoredPlaylist() was a wrapper for
spl_clear(), and is converted into a CPP macro for now.
|
|
|
|
| |
Renamed all public functions, prefix is "spl_".
|
|
No CamelCase in file names.
|