Max Kellermann
b7a1954c33
TagString: return WritableBuffer<char>
2014-10-10 22:07:19 +02:00
Max Kellermann
6520589a37
TagString: use strndup() for unterminated string
...
Fixes buffer overflow bug.
2014-10-10 22:06:48 +02:00
Max Kellermann
f445b0178a
TagString: remove ISO-Latin-1 fallback
...
MPD handles all strings in UTF-8 internally. Those decoders which
read Latin-1 tags are supposed to implement the conversion, instead of
passing Latin-1 to TagBuilder::AddItem(). FixTagString() is simply
the wrong place to do that, and hard-coding Latin-1 is kind of
arbitrary.
2014-10-10 20:53:08 +02:00
Max Kellermann
f618065f7c
fs/Traits: use value_type
2014-10-10 19:51:44 +02:00
nanotech
f0be48ff90
Main: run the OS X native event loop
2014-10-10 19:51:44 +02:00
Max Kellermann
bb922d577d
storage/nfs: use the libnfs async API
...
Share the NFS connection with the NFS input plugin.
2014-10-09 08:09:08 +02:00
Max Kellermann
990809cc21
lib/nfs/Connection: reduce Error instance allocations
2014-10-09 08:08:17 +02:00
Max Kellermann
bfcc466647
lib/nfs/Glue: add assertion
2014-10-09 07:59:53 +02:00
Max Kellermann
3d2558bde6
StoragePlugin: pass EventLoop to constructor
2014-10-09 07:45:25 +02:00
Max Kellermann
1aac0b10c9
test/run_input, ...: add struct ScopeIOThread
...
Auto-stop the IO thread in all error handlers.
2014-10-07 20:02:13 +02:00
Max Kellermann
e5ff85b63c
storage/nfs: move code to class MemoryStorageDirectoryReader
...
Read all directory entries into memory and close the struct nfsdir
before returning the StorageDirectoryReader instance. This is what
libnfs does, anyway.
2014-10-07 06:36:11 +02:00
Max Kellermann
f0bb5b84f9
storage/nfs: move code to Copy()
2014-10-07 06:35:53 +02:00
Max Kellermann
07b50f6c69
lib/nfs/Connection: add methods {Open,Read,Close}Directory()
2014-10-07 06:35:50 +02:00
Max Kellermann
61b3aaaa07
lib/nfs/Connection: add method Stat(path)
2014-10-07 06:35:46 +02:00
Max Kellermann
b5119d7958
test/run_storage: new debug program
2014-10-07 06:21:34 +02:00
Max Kellermann
d3e72e4344
Makefile.am: add libnfs and libsmbclient to STORAGE_LIBS
2014-10-07 06:21:34 +02:00
Max Kellermann
60512ffa09
lib/nfs/Connection: make GetEventLoop() public
2014-10-06 08:47:13 +02:00
Max Kellermann
b1a252a64d
lib/nfs/Base: kludge to reduce number of NFS mounts
...
Creating a NfsStorage sets its own export_name as the "base". Now
NfsFileReader can use this information to derive the export_name to be
mounted, instead of guessing. This solves the "too many connection"
problem on the NFS server while updating the database.
2014-10-05 07:41:50 +02:00
Max Kellermann
fb90b64bac
Makefile.am: compile libffmpeg.a with FFMPEG_CFLAGS
2014-10-04 14:23:11 +02:00
Max Kellermann
6e7a398263
PlaylistStream: use OpenLocalInputStream()
2014-10-02 22:03:02 +02:00
Max Kellermann
44d2d9b1e8
PlaylistStream: pass Path instance to playlist_open_path()
...
Convert filesystem charset to UTF-8 for playlist_list_open_uri().
This fixes one of many remaining charset bugs.
2014-10-02 22:02:11 +02:00
Max Kellermann
8302ed44aa
archive/bzip2: use OpenLocalInputStream()
2014-10-02 22:00:42 +02:00
Max Kellermann
7e12aea1d8
input/Open: use OpenLocalInputStream()
...
Make the "open" method of plugins "file" and "archive" dummy methods
that always fail. Instead, let InputStream::Open() hard-code access
to these two plugins by using OpenLocalInputStream(). This allows
simplifyin the algorithm for falling back to probing archive plugins.
2014-10-02 21:50:14 +02:00
Max Kellermann
20346b0da4
DecoderThread: use OpenLocalInputStream() for local files
2014-10-02 21:48:52 +02:00
Max Kellermann
e0e65cbdf9
TagFile: use OpenLocalInputStream()
2014-10-02 21:43:40 +02:00
Max Kellermann
9d2d58c4b6
input/LocalOpen: new library for opening local files
...
Combines the "file" and the "archive" input plugins.
2014-10-02 21:06:01 +02:00
Max Kellermann
0c461c3859
input/archive: export function OpenArchiveInputStream()
2014-10-02 21:00:38 +02:00
Max Kellermann
0d38bd9b3b
input/file: export function OpenFileInputStream()
2014-10-02 20:44:03 +02:00
Max Kellermann
2f02e49b9f
input/file: generate Error when errno==ENOENT
...
This special case was useless. Fixes the dreaded "Unrecognized URI"
error message when a file does not exist.
2014-10-02 20:16:05 +02:00
Max Kellermann
064e8a7c68
input/file: make the "fd" attribute "const"
2014-10-02 19:55:01 +02:00
Max Kellermann
e4dd269609
input/file: make variables more local
2014-10-02 19:18:58 +02:00
Max Kellermann
19dd59f38c
storage: remove redundant "virtual" keywords
...
"override" implies "virtual".
2014-10-02 19:17:46 +02:00
Max Kellermann
37501d9bc7
input/file: convert to class
2014-10-02 19:14:59 +02:00
Max Kellermann
89f9561d10
storage/Interface: include cleanup
2014-10-01 23:38:17 +02:00
Max Kellermann
8af3f91e78
Makefile.am: fix header file names
...
Found by "make distcheck".
2014-10-01 23:28:18 +02:00
Max Kellermann
0661fd6f7c
lib/nfs/FileReader: postpone the nfs_close_async() call
...
If an async opertion is in progress, nfs_close_async() will make
libnfs crash because the RPC callback will dereference an object that
was freed by nfs_close_async().
2014-10-01 23:10:32 +02:00
Max Kellermann
edd003b62a
lib/nfs/Connection: fix memory leak when cancelling Open()
...
Close the newly allocated file handle passed to the callback.
2014-10-01 23:03:31 +02:00
Max Kellermann
10cc87e422
lib/nfs/Connection: remove Mutex
...
All locks are currenly held from only a single thread (the IOThread)
and thus we don't need the Mutex.
2014-10-01 22:15:06 +02:00
Max Kellermann
0470f648c6
lib/nfs/Connection: add method GetEventLoop()
2014-10-01 22:10:46 +02:00
Max Kellermann
777360149d
lib/nfs/Connection: remove obsolete flag postponed_destroy
2014-10-01 22:10:05 +02:00
Max Kellermann
aa7774b82b
lib/nfs/Connection: remove deprecated move constructor workaround
...
Not used anymore because NfsManager now uses boost::intrusive::set
instead of std::map.
2014-10-01 22:09:37 +02:00
Max Kellermann
d44da875e7
storage/nfs: make a few attributes "const"
2014-10-01 21:14:26 +02:00
Max Kellermann
f9ad73598b
lib/nfs/Manager: use boost::intrusive::map
...
Reduce overhead for storing the key twice, and more overhead while
looking up the connection to remove it after a failure.
2014-10-01 20:49:40 +02:00
Max Kellermann
952fe98796
lib/nfs/Glue: add assertion
2014-10-01 20:44:54 +02:00
Max Kellermann
579912e52f
lib/nfs/Glue: destruct the NfsManager in the I/O thread
...
This allows eliminating the indirection code from the NfsConnection
destructor.
2014-10-01 20:39:50 +02:00
Max Kellermann
1b5ec3e3ca
lib/nfs/Glue: eliminate class NfsGlue
...
It's just a useless wrapper for class NfsManager.
2014-10-01 20:37:25 +02:00
Max Kellermann
fb4e6ac923
lib/nfs/Cancellable: use boost::intrusive::list
...
Reduce Remove() overhead because we don't have to walk the list to
find an iterator by reference.
2014-10-01 19:49:38 +02:00
Max Kellermann
3560dc4be6
Tag: support "AlbumSort"
...
The new tag is supported by all decoders that use the tag name table,
and the ID3v2 tag "TSOA" maps to it.
2014-09-29 18:55:59 +02:00
Max Kellermann
b002ea9a20
storage/nfs: convert file name to UTF-8
...
Assume the configured filesystem character set is also used by the NFS
server.
2014-09-28 18:26:54 +02:00
Max Kellermann
540317ea2b
storage/nfs: use string::append() instead of string::insert()
...
Swap the order of adding the URI and the slash, because appending is
cheaper than inserting.
2014-09-28 18:25:51 +02:00