path: root/lib/backupstore/BackupCommands.cpp
Commit message (Collapse)AuthorAge
* Improve exception handling on backup store side.Chris Wilson2015-08-15
| | | | | | | | | | | | | | | | Add a new exception code to represent an object being completely missing (not found on the store at all), separate from not being found in a particular directory. Improve mapping of server-side exceptions to protocol error messages returned to the client. Add handling for missing exceptions, such as BackupStoreException::PatchChainInfoBadInDirectory, and the new BackupStoreException::ObjectDoesNotExist. Fix mapping for BackupStoreException::CouldNotFindEntryInDirectory to make it distinguistable from BackupStoreException::ObjectDoesNotExist.
* Refactor handling of exceptions in protocol server command executors.Chris Wilson2014-10-31
| | | | | | | | | | Add a standard method to Replyable that will be called if a recoverable exception (a BoxException) occurs, and can return a protocol Message to be sent to the client, such as an error code for various standard errors, or rethrow the exception. If you want something different, catch exceptions and return the desired reply yourself, or you'll get the default handling.
* Whitespace, comment and readability fixesChris Wilson2014-10-31
* Remove the global logging level.Chris Wilson2014-04-09
| | | | | It's incompatible with having a logger that logs everything, regardless of the global log level.
* Always flush any incoming stream on server side.Chris Wilson2014-03-02
| | | | | | | | | | Otherwise the protocol might be broken and can't be used any more, even if we made an effort to return an Error reply instead of throwing an exception. This used to not be a problem because an Error reply would terminate the connection anyway, but it no longer does. So if the client also didn't terminate, but tried to handle the exception and keep using the connection, then it might find that its next command fails because the protocol is broken.
* Adding a directory when over limit returns an error instead of crashing.Chris Wilson2014-03-02
| | | | Just like adding a file does.
* Add QueryCreateDirectory2 command.Chris Wilson2014-03-02
| | | | | Allows creating a directory with a specified modtime (in the parent directory entry). Tests to come shortly.
* Rename BackupStoreInfo variable NumFiles to NumCurrentFiles.Chris Wilson2014-02-09
| | | | | Will hopefully prevent future confusion about the meaning of this info variable.
* Fix compile error.Chris Wilson2014-02-07
| | | | | Caused by premature switch from GetNumFiles to GetNumCurrentFiles.
* Add an AccountUsage2 command to backup protocol.Chris Wilson2014-02-07
| | | | | Allows us to get information about the account that's not available using the old AccountUsage command. Currently only used in tests.
* Move the comment to somewhere more useful.Chris Wilson2014-02-07
* Don't need to protect InvisibleTempFileStream against exceptions.Chris Wilson2014-02-07
| | | | | | | By definition, it will be cleared up by the OS automatically. Also we don't need to support gcc 2.x any more. It was replaced by gcc3 in 2001, 12 years ago.
* Rename BackupStoreContext.GetStoreRoot() to GetAccountRoot().Chris Wilson2014-02-07
| | | | More accurate name for this variable.
* Improve variable names and comments.Chris Wilson2013-08-22
| | | | Makes the source code more readable.
* Improve error messages from BackupCommands.Chris Wilson2013-08-22
| | | | | | When a command is sent in the wrong phase, or a command that requires write access is sent to a read-only session, log an error message with the command details (and current phase in the former case).
* Pass std::auto_ptr objects to Protocol for upload.Chris Wilson2013-08-22
| | | | | | | | | | | Passing raw pointers is bad C++ style, and dangerous, because Protocol will free the passed-in pointers after uploading them, so we should not keep using them. Reduce code duplication in BackupClientDirectoryRecord patch/normal upload. Return a std::auto_ptr<BackupStoreFileEncodeStream> instead of a std::auto_ptr<IOStream> from BackupStoreFile::EncodeFile* functions.
* Refuse login to disabled accounts.Chris Wilson2012-10-22
* Add remote host and port to post-login login message, requested by Pete Jalajas.Chris Wilson2011-12-13
* Log the account name with connections, disconnections and statistics, ↵Chris Wilson2011-12-12
| | | | requested by Pete Jalajas.
* Combine client and server protocols to make way for an offline/local protocol.Chris Wilson2011-08-27
| | | | | Rename ProtocolObject to Message.
* Major refactoring to make lib/backupclient depend on lib/backupstore ratherChris Wilson2011-04-26
than the other way around. This is needed to allow clients to have all the code that they'd need to implement local backups (using the Local protocol) in subsequent commits.