Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | lib/nfs/Connection: implement mount timeout | Max Kellermann | 2014-12-15 | 2 | -2/+31 |
| | |||||
* | lib/nfs/Connection: add debug flag "in_destroy" | Max Kellermann | 2014-12-15 | 2 | -0/+11 |
| | |||||
* | lib/nfs/Connection: add assertion | Max Kellermann | 2014-12-14 | 1 | -0/+2 |
| | |||||
* | lib/nfs/Connection: fix reconnect after mount failure | Max Kellermann | 2014-12-14 | 1 | -1/+1 |
| | | | | | | | When mounting had not yet finished, SocketMonitor::IsDefined() was always false, due to the workaround at the beginning of the function that calls SocketMonitor::Steal(). This commit drops the IsDefined() check because it was never necessary and breaks reconnect. | ||||
* | lib/nfs/Connection: fix typo in code comment | Max Kellermann | 2014-12-14 | 1 | -1/+1 |
| | |||||
* | lib/nfs/Connection: fix memory leak (and assertion failure) | Max Kellermann | 2014-12-14 | 3 | -0/+28 |
| | | | | | | | | | | | nfs_destroy_context() will invoke all pending callbacks with err==-EINTR. In CancellableCallback::Callback(), this will invoke NfsConnection::DeferClose(), which however is only designed to be called from nfs_service(). In non-debug mode, this will leak memory because nfs_close_async() is never called. Workaround: before nfs_destroy_context(), invoke nfs_close_async() on all pending file handles. | ||||
* | lib/nfs/Connection: move code to Service() | Max Kellermann | 2014-12-14 | 2 | -12/+28 |
| | |||||
* | lib/nfs/Connection: add assertions | Max Kellermann | 2014-12-14 | 1 | -0/+2 |
| | |||||
* | lib/nfs/Connection: move code to method InternalClose() | Max Kellermann | 2014-12-14 | 2 | -3/+17 |
| | |||||
* | lib/nfs/Connection: make in_service and in_event debug-only flags | Max Kellermann | 2014-12-14 | 2 | -0/+11 |
| | |||||
* | lib/nfs/Connection: fix crash while canceling a failing Open() | Max Kellermann | 2014-12-14 | 1 | -2/+4 |
| | | | | | | | The method NfsConnection::CancellableCallback::Callback() will always invoke NfsConnection::Close() on the file handle, even if the void pointer is not a nfsfh. This can happen if the Open() was not successful, e.g. when the file does not exist. | ||||
* | lib/nfs/Connection: add assertions | Max Kellermann | 2014-12-14 | 1 | -0/+31 |
| | |||||
* | lib/nfs/FileReader: clean up on disconnect | Max Kellermann | 2014-11-25 | 1 | -1/+1 |
| | | | | | Avoids crash because Close() invokes a call on a destructed NfsConnection. | ||||
* | lib/nfs/FileReader: move code to CancelOrClose() | Max Kellermann | 2014-11-25 | 2 | -0/+16 |
| | |||||
* | lib/nfs/FileReader: reset state in OnNfsConnectionFailed() | Max Kellermann | 2014-11-25 | 1 | -0/+2 |
| | | | | | Avoid calling NfsConnection::RemoveLease(), because the lease has been removed already. | ||||
* | lib/nfs/FileReader: update "state" in OnNfsError() | Max Kellermann | 2014-11-25 | 1 | -0/+24 |
| | | | | | | 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. | ||||
* | lib/nfs/Manager: defer NfsConnection destruction | Max Kellermann | 2014-11-25 | 2 | -9/+54 |
| | | | | | Avoids a crash that occurs when NfsConnection::OnSocketReady() dereferences itself before returning. | ||||
* | lib/nfs/Connection: broadcast error before closing connection | Max Kellermann | 2014-11-25 | 1 | -4/+4 |
| | | | | | | 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. | ||||
* | lib/nfs/Connection: cancel DeferredMonitor on disconnect | Max Kellermann | 2014-11-25 | 1 | -0/+4 |
| | | | | | Fixes potential second mount attempt after the old connection to the NFS server was shut down. | ||||
* | lib/nfs/FileReader: include Compiler.h for "final" fallback | Max Kellermann | 2014-11-25 | 1 | -0/+1 |
| | |||||
* | lib/upnp/ContentDirectoryService: swap uri_apply_base() parameters | Max Kellermann | 2014-11-07 | 1 | -1/+1 |
| | | | | | | 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. | ||||
* | lib/upnp/Discovery: add missing stdlib.h include | Max Kellermann | 2014-11-02 | 1 | -0/+1 |
| | |||||
* | db/upnp/Util: move caturl() to util/UriUtil.cxx | Max Kellermann | 2014-10-10 | 3 | -32/+2 |
| | |||||
* | storage/nfs: use the libnfs async API | Max Kellermann | 2014-10-09 | 2 | -0/+169 |
| | | | | Share the NFS connection with the NFS input plugin. | ||||
* | lib/nfs/Connection: reduce Error instance allocations | Max Kellermann | 2014-10-09 | 1 | -3/+2 |
| | |||||
* | lib/nfs/Glue: add assertion | Max Kellermann | 2014-10-09 | 1 | -0/+1 |
| | |||||
* | lib/nfs/Connection: add methods {Open,Read,Close}Directory() | Max Kellermann | 2014-10-07 | 2 | -0/+53 |
| | |||||
* | lib/nfs/Connection: add method Stat(path) | Max Kellermann | 2014-10-07 | 2 | -0/+33 |
| | |||||
* | lib/nfs/Connection: make GetEventLoop() public | Max Kellermann | 2014-10-06 | 1 | -4/+4 |
| | |||||
* | lib/nfs/Base: kludge to reduce number of NFS mounts | Max Kellermann | 2014-10-05 | 3 | -7/+124 |
| | | | | | | | 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. | ||||
* | lib/nfs/FileReader: postpone the nfs_close_async() call | Max Kellermann | 2014-10-01 | 4 | -6/+92 |
| | | | | | | 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(). | ||||
* | lib/nfs/Connection: fix memory leak when cancelling Open() | Max Kellermann | 2014-10-01 | 2 | -5/+23 |
| | | | | Close the newly allocated file handle passed to the callback. | ||||
* | lib/nfs/Connection: remove Mutex | Max Kellermann | 2014-10-01 | 2 | -18/+12 |
| | | | | | All locks are currenly held from only a single thread (the IOThread) and thus we don't need the Mutex. | ||||
* | lib/nfs/Connection: add method GetEventLoop() | Max Kellermann | 2014-10-01 | 2 | -1/+5 |
| | |||||
* | lib/nfs/Connection: remove obsolete flag postponed_destroy | Max Kellermann | 2014-10-01 | 2 | -18/+2 |
| | |||||
* | lib/nfs/Connection: remove deprecated move constructor workaround | Max Kellermann | 2014-10-01 | 1 | -16/+0 |
| | | | | | Not used anymore because NfsManager now uses boost::intrusive::set instead of std::map. | ||||
* | lib/nfs/Manager: use boost::intrusive::map | Max Kellermann | 2014-10-01 | 2 | -37/+78 |
| | | | | | Reduce overhead for storing the key twice, and more overhead while looking up the connection to remove it after a failure. | ||||
* | lib/nfs/Glue: add assertion | Max Kellermann | 2014-10-01 | 1 | -0/+4 |
| | |||||
* | lib/nfs/Glue: destruct the NfsManager in the I/O thread | Max Kellermann | 2014-10-01 | 3 | -5/+8 |
| | | | | | This allows eliminating the indirection code from the NfsConnection destructor. | ||||
* | lib/nfs/Glue: eliminate class NfsGlue | Max Kellermann | 2014-10-01 | 1 | -17/+1 |
| | | | | It's just a useless wrapper for class NfsManager. | ||||
* | lib/nfs/Cancellable: use boost::intrusive::list | Max Kellermann | 2014-10-01 | 3 | -40/+18 |
| | | | | | Reduce Remove() overhead because we don't have to walk the list to find an iterator by reference. | ||||
* | nfs/Connection: check for disappearing libnfs socket | Max Kellermann | 2014-08-31 | 1 | -0/+18 |
| | |||||
* | nfs/Connection: use only BroadcastError() | Max Kellermann | 2014-08-31 | 1 | -4/+1 |
| | | | | | Since BroadcastError() calls BroadcastMountError(), there's no need to check mount_finished here. | ||||
* | nfs/Connection: nfs_get_fd() can return -1 | Max Kellermann | 2014-08-31 | 1 | -0/+3 |
| | | | | | While reconnecting to the NFS server, the socket is -1, because there is no socket. Fixes a potential crash (assertion failure). | ||||
* | nfs/Connection: use nfs_get_error() for mount error | Max Kellermann | 2014-08-31 | 1 | -2/+3 |
| | |||||
* | nfs/Connection: fix assertion failure | Max Kellermann | 2014-08-31 | 1 | -1/+3 |
| | |||||
* | *: add missing Compiler.h includes | Max Kellermann | 2014-08-30 | 2 | -0/+2 |
| | | | | Necessary for "final" on gcc 4.6. | ||||
* | Tag: use SignedSongTime for the song duration | Max Kellermann | 2014-08-29 | 1 | -1/+1 |
| | |||||
* | input/ffmpeg: use av_strerror() | Max Kellermann | 2014-08-18 | 2 | -0/+74 |
| | | | | Generate more detailed error messages. | ||||
* | {input,decoder}/ffmpeg: move ffmpeg_domain to lib/ffmpeg/Domain.cxx | Max Kellermann | 2014-08-18 | 2 | -0/+51 |
| | | | | Eliminate duplicate definition (in input plugin and decoder plugin). |