Max Kellermann
2ca18a7ee5
lib/sqlite/Domain: add Domain instance for SQLite
...
Replaces the sticker_domain for Error::domain.
2014-12-12 20:49:00 +01:00
Max Kellermann
7b60e3916c
DespotifyUtils: make string buffers temporary
2014-12-09 22:14:47 +01:00
Max Kellermann
c486c5bf5b
DespotifyUtils: fix coding style
2014-12-09 22:10:17 +01:00
Max Kellermann
fc0b6d143a
DespotifyUtils: use ARRAY_SIZE()
2014-12-09 22:06:22 +01:00
Max Kellermann
bc00c38f9d
lib/icu/Converter: add ICU-based backend
2014-12-01 21:56:48 +01:00
Max Kellermann
0f35016773
lib/icu/Converter: add TODO comment
2014-11-30 19:08:38 +01:00
Max Kellermann
c641ca90a9
lib/icu/Collate: move code to Util.cxx
2014-11-30 10:53:05 +01:00
Max Kellermann
87c88fcb27
fs/Charset: move code to wrapper class IcuConverter
...
Prepare for a ICU-based backend without GLib.
2014-11-30 00:31:13 +01:00
Max Kellermann
e72eef421b
lib/nfs/FileReader: clean up on disconnect
...
Avoids crash because Close() invokes a call on a destructed
NfsConnection.
2014-11-25 14:02:15 +01:00
Max Kellermann
016063c810
lib/nfs/FileReader: move code to CancelOrClose()
2014-11-25 14:00:32 +01:00
Max Kellermann
38f19981b2
lib/nfs/FileReader: reset state in OnNfsConnectionFailed()
...
Avoid calling NfsConnection::RemoveLease(), because the lease has been
removed already.
2014-11-25 13:51:09 +01:00
Max Kellermann
40dd968f13
lib/nfs/FileReader: update "state" in OnNfsError()
...
Clean up the "state" to indicate that there is no longer any
asynchronous operation. Fixes another NFS-related crash due to
cleanup of a non-existing asynchronous operation.
2014-11-25 13:39:42 +01:00
Max Kellermann
3cef348f30
lib/nfs/Manager: defer NfsConnection destruction
...
Avoids a crash that occurs when NfsConnection::OnSocketReady()
dereferences itself before returning.
2014-11-25 13:31:18 +01:00
Max Kellermann
b293b16007
lib/nfs/Connection: broadcast error before closing connection
...
During the NfsLease::OnNfsConnectionFailed() call, the old (defunct)
nfs_context may be used to close file handles. Such code does not yet
exist, but will be added soon to fix other bugs.
2014-11-25 13:27:06 +01:00
Max Kellermann
f5f43db2da
lib/nfs/Connection: cancel DeferredMonitor on disconnect
...
Fixes potential second mount attempt after the old connection to the
NFS server was shut down.
2014-11-25 13:22:25 +01:00
Max Kellermann
029555d192
lib/nfs/FileReader: include Compiler.h for "final" fallback
2014-11-25 13:18:22 +01:00
Max Kellermann
6f23e91e33
lib/upnp/ContentDirectoryService: swap uri_apply_base() parameters
...
When uri_apply_base() was moved from db/upnp/Util.cpp to
util/UriUtil.cpp, the parameter order was changed, however without
swapping the parameters in the ContentDirectoryService constructor.
2014-11-07 18:43:00 +01:00
Max Kellermann
054323c2bc
lib/upnp/Discovery: add missing stdlib.h include
2014-11-02 11:04:13 +01:00
Max Kellermann
464767c5fd
db/upnp/Util: move caturl() to util/UriUtil.cxx
2014-10-10 22:43:40 +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
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
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
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
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
43da1686da
nfs/Connection: check for disappearing libnfs socket
2014-08-31 19:33:08 +02:00
Max Kellermann
6d643f92b7
nfs/Connection: use only BroadcastError()
...
Since BroadcastError() calls BroadcastMountError(), there's no need to
check mount_finished here.
2014-08-31 19:32:41 +02:00
Max Kellermann
559a01f585
nfs/Connection: nfs_get_fd() can return -1
...
While reconnecting to the NFS server, the socket is -1, because there
is no socket. Fixes a potential crash (assertion failure).
2014-08-31 19:08:26 +02:00
Max Kellermann
fd8a53ca3d
nfs/Connection: use nfs_get_error() for mount error
2014-08-31 17:44:35 +02:00
Max Kellermann
8707aafaf7
nfs/Connection: fix assertion failure
2014-08-31 17:39:33 +02:00
Max Kellermann
b373c53ce4
*: add missing Compiler.h includes
...
Necessary for "final" on gcc 4.6.
2014-08-30 00:46:52 +02:00
Max Kellermann
7c25d83f1c
Tag: use SignedSongTime for the song duration
2014-08-29 13:20:58 +02:00
Max Kellermann
e6e9c21275
input/ffmpeg: use av_strerror()
...
Generate more detailed error messages.
2014-08-18 20:35:34 +02:00
Max Kellermann
636f5d4a1d
{input,decoder}/ffmpeg: move ffmpeg_domain to lib/ffmpeg/Domain.cxx
...
Eliminate duplicate definition (in input plugin and decoder plugin).
2014-08-18 10:12:37 +02:00
François Revol
e2e5cddcaa
icu: include strings.h for strcasecmp
...
Again, POSIX says strcasecmp is not in string.h.
2014-08-16 07:53:08 +02:00
Max Kellermann
3a111e5d74
fs/io/GzipOutputStream,GunzipReader: move zlib_domain to src/lib/zlib/Domain.cxx
2014-08-11 21:48:25 +02:00
Max Kellermann
3f695fdfaf
lib/nfs/Connection: include poll.h
2014-06-30 10:22:08 +02:00
Max Kellermann
eb8fd07900
lib/nfs/Manager: gcc 4.7 compatibility hack
...
std::map::emplace() is only available from gcc 4.8 on.
2014-06-17 10:35:34 +02:00