| Commit message (Collapse) | Author | Age |
| |
|
|
|
|
|
| |
OpenBSD's compiler appears to be more sensitive than others.
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
| |
Makes way for more use of local protocol objects and protocol subclasses.
Merged back changes from the test refactor branch to reduce diffs.
|
|
|
|
|
|
| |
Hopefully all of these changes are inconsequential.
Merged back changes from the test refactor branch to reduce diffs.
|
|
|
|
| |
We don't really need these, so clean up by removing them.
|
| |
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
| |
Allows retrieving the error message for a given code, when we no longer have
the protocol object handy.
Conflicts:
lib/server/makeprotocol.pl.in
|
| |
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
| |
|
| |
|
|
|
|
|
| |
When a command fails with an error, and CheckReply throws an exception, the
mStreamsToSend were not deleted.
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
| |
Makes code easier to read.
|
|
|
|
|
| |
So we can call it on either a Client or a Local protocol object, without
having to know which it is, or cast it.
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
| |
decrypt fails.
|
| |
|
| |
|
| |
|
|
|
|
|
| |
Rename ProtocolObject to Message.
|
|
|
|
|
|
| |
that we use for standard logging, to fix 64bit platform warnings
reported by Matt Brown.
|
|
|
|
|
|
|
| |
message as a string.
Fix a typo in a comment.
|
|
|
|
|
|
|
|
|
| |
Fix double logging of protocol commands on the server side.
Log protocol errors at WARNING level.
Fix typos in comments and variable names.
|
|
|
|
|
| |
the logs on the console along with other debug output.
|
| |
|
| |
|
|
|
|
|
| |
64-bit format fixes (Win32)
|
| |
|
|
|
|
|
|
|
| |
- 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 just renames all of the files that configure now substitutes - no changes to any of the files.
|