summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAge
* Changed many uses of BackupProtocolClient to BackupProtocolCallable.Chris Wilson2014-09-04
| | | | | | Makes way for more use of local protocol objects and protocol subclasses. Merged back changes from the test refactor branch to reduce diffs.
* Define setup and teardown functions and macros, and use them.Chris Wilson2014-09-04
| | | | Merged back changes from the test refactor branch to reduce diffs.
* Backport Timers::Cleanup that's safe to use in test cleanup.Chris Wilson2014-09-04
| | | | | | | | | | Allows it not to throw an exception if timers weren't initialised when cleanup was requested. Normally we want an exception thrown, but not while we're cleaning up a test that might have failed with timers uninitialised. More timers fixes after cleanup no-exception option. Merged back changes from the test refactor branch to reduce diffs.
* Simplify code with macros, update comments and fix whitespace.Chris Wilson2014-09-04
| | | | | | Hopefully all of these changes are inconsequential. Merged back changes from the test refactor branch to reduce diffs.
* Define some functions to reduce duplication in testbbackupd.Chris Wilson2014-09-04
| | | | | | | | | Merged back changes from the test refactor branch to reduce diffs. Fix wrong setting of log level in compare() function. We want to only show errors if we expect mismatches, and show warnings if we didn't expect mismatches. I had it the other way around before.
* Fix timing issue with bbackupd test for recovery after error.Chris Wilson2014-08-24
| | | | | | | For some reason the timing changed and the test was no longer waiting for the same length of time as bbackupd, causing it to fail. Merged back changes from the test refactor branch to reduce diffs.
* Fix tests broken by bbackupquery list recursive option change.Chris Wilson2014-08-17
|
* Add option to sort results of bbackupquery ls command.Chris Wilson2014-08-15
| | | | | | | | | | The new default is to sort by name, with directories first. Put the documentation on the "ls" command, instead of the "list" command, since that's annoyed me too many times. The recursive list option is changed from "-r" to "-R", to match the shell ls command.
* Improve commentChris Wilson2014-08-15
|
* Fix poll timeout calculation for infinite timeouts.Chris Wilson2014-08-15
|
* Add missing network operation timeouts to test/basicserver.Chris Wilson2014-08-15
|
* Fix compile error caused by auto consume streams patch.Chris Wilson2014-08-15
|
* Trivial white space fixes.Chris Wilson2014-08-15
|
* Improve StoreObjectInfoFile messages.Chris Wilson2014-08-15
| | | | Avoid reporting an error if the file is missing or empty.
* Add timeouts to network operations that are missing them.Chris Wilson2014-08-15
|
* Whitespace fixes.Chris Wilson2014-08-15
|
* Add missing timeouts for network operations.Chris Wilson2014-08-15
|
* Improve readability of block checksum match message.Chris Wilson2014-08-15
| | | | Mute the mismatch message, as there are just too many of them.
* Add timeouts to command socket operations.Chris Wilson2014-08-15
|
* Fix deadlock waiting for read or write on closed connection.Chris Wilson2014-08-15
| | | | | | | | If the system is suspended then it may not realise that a TCP connection has been closed, while waiting for data to arrive on it. We didn't used to apply a timeout to this read operation. Now we use the connection's default timeout on all read and write operations. Network operations that don't pass a timeout will be logged with a backtrace, so that they can be fixed.
* Fix crash when there's no background task to execute.Chris Wilson2014-08-15
|
* Compile fix for backwards compatibility code.Chris Wilson2014-08-15
|
* Add a TEST_PROTOCOL_ERROR_OR assertion.Chris Wilson2014-08-15
| | | | | | | | Similar to TEST_COMMAND_RETURNS_ERROR_OR, but allows any command or sequence to cause the error, without direct access to the command message. Refactor so that TEST_COMMAND_RETURNS_ERROR_OR calls TEST_PROTOCOL_ERROR_OR to make the assertion on the last error seen by the protocol.
* Use std::auto_ptrs instead of bare pointers for exclude lists.Chris Wilson2014-08-15
| | | | | Allows us to remove code to handle cleanups after exceptions and on Location destruction.
* Replace switch statement of protocol errors with ↵Chris Wilson2014-08-15
| | | | | | | | BackupProtocolError::GetMessage(). Conflicts: bin/bbackupd/BackupDaemon.h
* Move code for creating/renaming remote dir to match local dir into own method.Chris Wilson2014-08-15
| | | | | | | | Reduces code indentation, scope leakage, and length of a long method. Conflicts: bin/bbackupd/BackupClientDirectoryRecord.h
* Rename rFilename argument to BackupClientDirectoryRecord::UploadFile, add ↵Chris Wilson2014-08-15
| | | | | | | | | | | remote path. rFilename renamed to rLocalPath to improve code clarity. rRemotePath added to allow it to be passed to notifier methods. Conflicts: bin/bbackupd/BackupClientDirectoryRecord.cpp
* Remove ServerException.h and the exception code aliases that it defines.Chris Wilson2014-08-15
| | | | We don't really need these, so clean up by removing them.
* Whitespace, wrapping, comments and dead code cleanups.Chris Wilson2014-08-15
| | | | | | | | Conflicts: bin/bbackupd/BackupDaemon.cpp bin/bbackupd/BackupDaemon.h test/bbackupd/testbbackupd.cpp
* Add message to ClientMarkerNotAsExpected exception.Chris Wilson2014-08-15
| | | | To help with debugging.
* Trailing whitespace fixes.Chris Wilson2014-08-15
| | | | | | Conflicts: bin/bbackupd/BackupClientDirectoryRecord.cpp
* Whitespace fixes.Chris Wilson2014-04-29
|
* Add a ToString method to IOStream and some subclasses.Chris Wilson2014-04-29
| | | | | Useful to help debug problems such as invalid file headers when the source of the stream might not be too obvious.
* Fix error when modifying a directory with missing entry in parent.Chris Wilson2014-04-29
| | | | This is hopefully the cause of the segfaults reported by Brendon Baumgartner.
* Add a comment explaining why we can't move detached dirs back into place.Chris Wilson2014-04-29
|
* Fix crash uploading empty attributes when directory disappears during scan.Chris Wilson2014-04-26
| | | | | Thanks to Brendon Baumgartner for the report on the mailing list, and for helping to diagnose the problem.
* Don't just eat the exception, rethrow it after logging details.Chris Wilson2014-04-25
|
* Update configure scripts to latest version.Chris Wilson2014-04-18
| | | | | | Was having problems compiling on MinGW x86_64, with the scripts failing to properly detect the platform and recommending upgrading them. It may not have fixed the problem, but doesn't seem like a bad idea.
* Add debugging code for when SendStream() fails during client command.Chris Wilson2014-04-18
| | | | | | | | | Will hopefully help to debug Brendon Baumgartner's issue with backups not completing and repeating over and over, due to this error: > Apr 18 11:14:09 hosting bbackupd[18990]: WARNING: Exception thrown: > ServerException(Protocol_BadUsage) (Sending a stream with a definite > size of zero is not allowed in the protocol) at Protocol.cpp:703
* Restore correct initialisation of mCurrentSyncStartTime.Chris Wilson2014-04-18
| | | | Was accidentally removed by the refactoring of the backup idle loop.
* Eliminate duplicate call to GetCurrentBoxTime().Chris Wilson2014-04-18
|
* Rewrap long lines (whitespace only).Chris Wilson2014-04-18
|
* Stop the CommandSocketPollTimer at end of each backup.Chris Wilson2014-04-18
| | | | | Otherwise it interrupts us needlessly while we're sleeping waiting for the next backup.
* Simplify the sync start logic some more, log when force-sync overrides script.Chris Wilson2014-04-18
|
* Make bbackupctl status display the human-readable daemon state name.Chris Wilson2014-04-18
|
* Call RunBackgroundTask while scanning directories as well.Chris Wilson2014-04-17
| | | | | Enables bbackupd to be stopped, reloaded or status queried while scanning a large directory.
* Rewrap some lines to reduce unnecessary wrapping.Chris Wilson2014-04-17
|
* Fix warnings about member variables being initialised in a different order.Chris Wilson2014-04-17
|
* Don't consider inode database errors enough reason to run the next backupChris Wilson2014-04-17
| | | | immediately after the end of the current one.
* Rewrite backup idle/poll loop for clarity.Chris Wilson2014-04-17
| | | | | | | | Add helpful debugging messages about why the decision was taken to sleep or start a backup, and how long the system will wait until the next backup. Flatten the code to avoid the double loop.