summaryrefslogtreecommitdiff
path: root/lib/server/makeprotocol.pl.in
Commit message (Collapse)AuthorAge
* Handle generic exceptions by returning an Error message with correct Type.Chris Wilson2015-08-06
|
* Fix compile error on OpenBSD due to invalid forward declarations of classes.Chris Wilson2014-12-22
| | | | | OpenBSD's compiler appears to be more sensitive than others.
* 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.
* Add check for trying to ReceiveStream when no stream availableChris Wilson2014-09-18
|
* Whitespace fixesChris Wilson2014-09-18
|
* Catch exceptions while executing store commands, and return an error message.Chris Wilson2014-09-04
| | | | | | | | | This will allow the client to eventually have more information about what went wrong on the server, if the server admin agrees, and makes test debugging easier. Backport some additional testbackupstore tests from the test refactor branch. Merged back changes from the test refactor branch to reduce diffs.
* 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.
* 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.
* 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.
* Don't just eat the exception, rethrow it after logging details.Chris Wilson2014-04-25
|
* 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
* Add a static GetMessage() to BackupProtocolError.Chris Wilson2014-04-09
| | | | | | | | | Allows retrieving the error message for a given code, when we no longer have the protocol object handy. Conflicts: lib/server/makeprotocol.pl.in
* Whitespace, comments and log messages cleanups.Chris Wilson2014-03-02
|
* 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.
* Use static_cast instead of C-style casts, for C++ style and safety.Chris Wilson2014-03-02
|
* Fix whitespace and comments, remove redundant code in protocol generator.Chris Wilson2014-03-02
|
* Add convenience macro for testing commands that return errors.Chris Wilson2014-03-02
|
* Fix memory leak in local protocol.Chris Wilson2014-03-02
| | | | | When a command fails with an error, and CheckReply throws an exception, the mStreamsToSend were not deleted.
* Add information about last exchange when wrong type of object received.Chris Wilson2014-03-02
| | | | | | | | | | Helps with debugging ConnectionException::Protocol_StreamWhenObjExpected and ConnectionException::Protocol_ObjWhenStreamExpected errors, which may be caused by a command returning an error message and failing to consume any uploaded streams first. Add extra debugging in ProtocolLocal objects to detect when this happens during the command itself, which helps with debugging.
* Make Protocol take control of the socket object passed in.Chris Wilson2014-03-01
| | | | | | | | | | | | | We pass a std::auto_ptr<SocketStream> to every Protocol subclass when we construct it, and it takes control of this object. This reduces the risk of: * accidentally reusing the same SocketStream for multiple Protocols (it happened to me in testbackupstore); * holding onto a reference to the SocketStream; * allowing a locally-scoped SocketStream to go out of scope and be released while still being referenced by a live Protocol.
* Don't write #include statements for empty filenames.Chris Wilson2014-02-07
|
* Rename $cmd_class to $cmd_classes.Chris Wilson2014-02-07
| | | | Makes code easier to read.
* Add ReceiveStream to protocol callable base class.Chris Wilson2014-02-07
| | | | | So we can call it on either a Client or a Local protocol object, without having to know which it is, or cast it.
* 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.
* Add a ToString() method on protocol objects, to help with debugging them.Chris Wilson2013-08-21
|
* Defend against exceptions during logging, e.g. CipherException if filename ↵Chris Wilson2012-04-28
| | | | decrypt fails.
* Store more details in protocol exceptions to help with debugging.Chris Wilson2012-02-02
|
* Output the names of protocol files being written.Chris Wilson2011-08-28
|
* Finish renaming auto-generated classes to fix compilation errors.Chris Wilson2011-08-28
|
* Combine client and server protocols to make way for an offline/local protocol.Chris Wilson2011-08-27
| | | | | Rename ProtocolObject to Message.
* Use the same ostringstream formatting for protocol logging to fileChris Wilson2008-10-29
| | | | | | that we use for standard logging, to fix 64bit platform warnings reported by Matt Brown.
* Add a GetMessage() method to Protocol objects to return a stringified Chris Wilson2008-05-28
| | | | | | | message as a string. Fix a typo in a comment.
* Use logging framework for streaming messages.Chris Wilson2008-01-31
| | | | | | | | | Fix double logging of protocol commands on the server side. Log protocol errors at WARNING level. Fix typos in comments and variable names.
* Make ExtendedLogging use the logging framework so that we can viewChris Wilson2007-12-04
| | | | | the logs on the console along with other debug output.
* Add missing newlines to protocol logging to a file (refs #9)Chris Wilson2006-11-26
|
* Use BoxPlatform to see if we are building on Windows (refs #3)Chris Wilson2006-10-14
|
* (refs #3)Chris Wilson2006-08-31
| | | | | 64-bit format fixes (Win32)
* Revert to trunkChris Wilson2006-08-31
|
* * mergeChris Wilson2006-07-27
| | | | | | | - This is my current patch queue. I think that all of these are safe to apply. This is just under half of the pending changes in chris/general (the easy half).
* This is part 2 of a patch from James O'Gorman.Martin Ebourne2006-03-04
This just renames all of the files that configure now substitutes - no changes to any of the files.