Commit Graph

170 Commits

Author SHA1 Message Date
Max Kellermann 0ccaf4a1ff storage/FileInfo: add initializing constructor 2017-02-11 23:45:14 +01:00
Max Kellermann 4146475c73 util/ChronoUtil: new utility library for std::chrono 2017-02-11 22:23:33 +01:00
Max Kellermann 329c3ab21b fs/FileInfo: use std::chrono::system_clock 2017-02-10 23:48:21 +01:00
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 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