Max Kellermann
73f58c57e8
storage/curl: use CURLOPT_POSTFIELDS instead of CURLOPT_READFUNCTION
2017-02-06 23:25:03 +01:00
Max Kellermann
611ce6e756
lib/nfs/{FileReader,Glue}: pass EventLoop&
...
Eliminate dependency on io_thread_get().
2017-01-25 23:02:02 +01:00
Max Kellermann
58fb36bdb9
storage/http: new storage plugin
2017-01-08 14:40:20 +01:00
Max Kellermann
5900253b85
update copyright year
2017-01-03 20:48:59 +01:00
Max Kellermann
31d77ec580
input/curl, ...: use strncmp() instead of memcmp() to avoid crash
2017-01-03 13:17:02 +01:00
Max Kellermann
2e182e84c3
thread/Mutex: remove ScopeLock, use std::lock_guard directly
2017-01-03 07:11:57 +01:00
Max Kellermann
b042095ac2
event/Loop: use std::chrono
2016-12-28 01:15:08 +01:00
Max Kellermann
d765182bbb
config/Global: _get_path() throws exception on error
2016-11-02 10:07:57 +01:00
Max Kellermann
c598686bd9
storage: migrate from class Error to C++ exceptions
2016-10-27 21:35:19 +02:00
Max Kellermann
cab87e9398
storage/FileInfo: make methods "constexpr"
2016-10-27 21:35:19 +02:00
Max Kellermann
680037927d
Merge branch 'v0.19.x'
2016-10-27 21:27:19 +02:00
Max Kellermann
ee026386e5
storage/Composite: avoid setting the error twice
...
If an error has already been set by f.directory->storage->GetInfo(),
don't set it again.
2016-10-27 21:26:55 +02:00
Max Kellermann
debc855806
Merge branch 'v0.19.x'
2016-10-27 21:01:27 +02:00
Max Kellermann
f9a64d24bf
storage/Composite: eliminate the second FindStorage() overload
...
It was used in a wrong way, which did not deal with errors
consistently. And if that's wrong, there is no need for FindStorage()
at all - let's remove it and the confusion around it.
2016-10-27 19:55:20 +02:00
Max Kellermann
e1a8dcfcc8
storage/Composite: add FindStorage() API documentation
2016-10-27 19:55:08 +02:00
Max Kellermann
1ee0e29974
storage/Composite: fix documentation typo
2016-10-27 17:12:24 +02:00
Max Kellermann
539c0ed171
{input,storage}/nfs: use C++ exceptions instead of class Error
2016-09-16 17:43:32 +02:00
Max Kellermann
135662d6b0
lib/smbclient/Init: throw std::runtime_error on error
2016-09-05 11:32:20 +02:00
Max Kellermann
ba69ade024
Compiler.h: add macro CLANG_OR_GCC_VERSION()
2016-08-23 09:48:58 +02:00
Max Kellermann
9b85446808
util/StringPointer: rename typedef pointer to pointer_type
2016-04-12 22:53:06 +02:00
Max Kellermann
1aee89f5ea
*: include cleanup (using iwyu)
2016-03-01 22:08:13 +01:00
Max Kellermann
1d67aa7bf2
update copyright year to 2016
2016-02-26 17:54:05 +01:00
Max Kellermann
f3503e0026
fs/DirectoryReader: use C++ exceptions instead of class Error
2015-12-29 12:56:26 +01:00
Max Kellermann
c880099deb
util/StringCompare: add StringIsEmpty()
2015-11-06 09:37:07 +01:00
Max Kellermann
58996b841a
config/Global: allow calling config_get_string() with one argument
...
default_value defaults to nullptr.
2015-06-26 08:06:40 +02:00
Max Kellermann
90e7ace980
release v0.19.10
...
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2
iQIcBAABCAAGBQJVhsF2AAoJECNuiljG20US2OUQAIyDcaUCFgUa2CYa7MftCPGc
dYJFwf+6Y2fJdSXcogYZmXNKNjFbPAZ4qqGdoNfI5a0rLxMarmL4DyjziAWi3ETB
MOkZK65Y5ySyyw69e+i/XsOwOn8rm6jDuwHKpT7wVJNjvZ8nA8esvu5b1Ief5LBd
UwEmn5DtKjA7dErHEYd2YvMK0xm+YmoKXuhmJKAn3sQdCEldgH4T5BCdOqmfrHWX
BYmNxmP3PU9Tqi7XHTSFZJn6vWiXhOoWr4Cb7K54j49sRV2B4QMWX1CLyK4+Jwmk
NZwD1IoGtoks5twfMTA9F9dBV/CPAWT69E0LIvaFJwCyoPCEnEi6k41bRAWK7P65
QwKxdtY/GZnVFpiqXba+wkD6VBa5wmkjS10+cIBhz3CVCEE+N5YacubUw5JieYg3
kOG2htSF1YP/Mo+IAObO9doQWHnDUavVhhpQ8UyqQ1bDMsmaEpfE16TRmlY/l5wx
Aor2p6D3c0E0IGpEwjOl6T9pDql4dyTdrRLLXJ6oD9iYv2rDdahctBRdyFZ1mRwX
oNUz8bfGDrshHVvwjQTr2b4O+w+yc+RSuJcyCGGcn5LakBuiM6vYNYuZzq3Yj/RK
Wk7RErVsbtY4ZRH06Lf5MSM5TflnrfQmzkUB0rZ0XoDyweoHOHPyzKhvBaKhadNh
UnEx4kCOvWdjFXUVWH3Q
=MrVf
-----END PGP SIGNATURE-----
Merge tag 'v0.19.10'
2015-06-21 16:06:02 +02:00
Thomas Guillem
3436a646b5
storage/nfs: fix deadlock when connecting
...
The Connect method can be called between Schedule and lock. In that case, when
locked, the state is already set to CONNECTING of READY and the condition won't
be signaled anymore.
2015-05-29 22:39:14 +02:00
Max Kellermann
f16054639b
storage/local: use PathTraitsFS typedefs
2015-03-03 13:12:54 +01:00
Max Kellermann
90a61b6bab
fs/FileInfo: new library providing GetFileInfo()
...
Replaces StatFile(), with a portable data object.
2015-02-28 23:00:26 +01:00
Max Kellermann
2d06a8e880
storage/FileInfo: rename to StorageFileInfo
2015-02-28 23:00:26 +01:00
Max Kellermann
1c3f5517fa
config/Option: convert to strictly-typed enum
2015-01-21 23:30:00 +01:00
Max Kellermann
712ed555e6
Copyright year 2015
2015-01-01 19:48:13 +01:00
Max Kellermann
412bedb697
Merge branch 'v0.19.x'
2014-12-26 14:40:32 +01:00
Max Kellermann
163597ef69
db/simple: fix implicit nullptr/bool conversion
...
Return false on error, not nullptr.
2014-12-26 14:34:03 +01:00
Max Kellermann
adfc5db3d2
Merge branch 'v0.19.x'
2014-12-15 00:46:56 +01:00
Max Kellermann
68d1abdb85
storage/nfs: clear last_error in SetState()
...
Fixes bogus assertion failure.
2014-12-15 00:39:30 +01:00
Max Kellermann
d93172bee8
Compiler.h: add macro CLANG_OR_GCC_VERSION()
2014-11-28 19:09:56 +01: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
3d2558bde6
StoragePlugin: pass EventLoop to constructor
2014-10-09 07:45:25 +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
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
19dd59f38c
storage: remove redundant "virtual" keywords
...
"override" implies "virtual".
2014-10-02 19:17:46 +02:00
Max Kellermann
89f9561d10
storage/Interface: include cleanup
2014-10-01 23:38:17 +02:00
Max Kellermann
d44da875e7
storage/nfs: make a few attributes "const"
2014-10-01 21:14:26 +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
Max Kellermann
142d1951d2
storage/nfs: move code to UriToNfsPath()
2014-09-28 18:12:20 +02:00
Max Kellermann
350d2bcd6e
storage/Configured: fix fallback music directory
...
This was accidently disabled when storage plugins were introduced.
2014-03-01 18:45:09 +01:00
Max Kellermann
2a16fc74fd
CompositeStorage: add method GetMount()
2014-02-27 20:49:13 +01:00
Max Kellermann
150443b014
DatabasePlugin: add FLAG_REQUIRE_STORAGE
...
Ignore the storage configuration if FLAG_REQUIRE_STORAGE is not set in
the DatabasePlugin.
2014-02-19 23:24:17 +01:00
Max Kellermann
e3e2ad4ae5
CompositeStorage: fix tree walk in Directory::Unmount()
2014-02-12 23:48:08 +01:00
Max Kellermann
0935ae330a
StorageCommands: add command "listmounts"
2014-02-12 21:47:59 +01:00
Max Kellermann
59ce67e2e5
CompositeStorage: new Storage implementation
...
This is the backend for the upcoming "mount" command.
2014-02-09 10:47:29 +01:00
Max Kellermann
37b6899660
Main: move code to storage/Configured.cxx
2014-02-09 08:09:47 +01:00
Max Kellermann
b3663b5da2
storage/nfs: new storage plugin
2014-02-08 14:24:47 +01:00
Max Kellermann
a0088ccce1
storage: add struct StoragePlugin and a plugin registry
2014-02-07 23:46:15 +01:00
Max Kellermann
be081929f4
storage/local: remove utf8 path from constructor
...
Build the UTF-8 version of the path automatically in the constructor.
2014-02-07 23:41:06 +01:00
Max Kellermann
ffd16b55a6
StoragePlugin: add method MapToRelativeUTF8()
...
Replaces map_to_relative_path() from Mapper.cxx.
2014-02-07 19:09:28 +01:00
Max Kellermann
b2e3fdef0f
storage/local: hide the class declarations
...
Hide inside CreateLocalStorage().
2014-02-07 01:11:52 +01:00
Max Kellermann
c8f0c7e9ed
*/smbclient: protect all libsmbclient calls with a mutex
...
libsmbclient is not thread-safe nor reentrant. We must protect all
function calls with a global mutex, unfortunately.
2014-02-06 22:19:59 +01:00
Max Kellermann
957beeb0e9
storage/smbclient: Storage implementation using libsmbclient
2014-02-06 07:19:14 +01:00
Max Kellermann
dc76b24e5f
storage/local: OpenDirectory() returns StorageDirectoryReader*
2014-02-05 19:35:41 +01:00
Max Kellermann
e3e3053f32
storage/Interface: explicitly delete copy constructors
2014-02-05 19:30:58 +01:00
Max Kellermann
c8c3f20840
storage/local: move to src/storage/plugins/
2014-02-05 19:26:21 +01:00
Max Kellermann
0ba1b73395
storage: add abstract interface
...
Prepare for the plugin interface.
2014-02-05 18:53:51 +01:00
Max Kellermann
9ae7f186bc
LocalStorage: new API abstracting filesystem walk
...
Prepare to make this a new plugin API, for example to use a SMB share
for the music_directory.
2014-02-05 10:04:03 +01:00