| Commit message (Collapse) | Author | Age |
|
|
|
|
|
| |
On Windows we can't delete the file while it's open, and we don't need to,
because we opened it for exclusive use, so another process can't lock it
between us unlocking and deleting it.
|
| |
|
| |
|
|
|
|
|
| |
E.g. you can run with -L NamedLock.cpp to only show messages logged in
that file. You can also repeat it to only show messages from certain files.
|
|
|
|
| |
with it.
|
|
|
|
|
| |
Allows the exception message to be captured before it goes out of scope.
|
| |
|
|
|
|
|
| |
NamedLock simply didn't work before. This may cause test failures, but the
tests are already failing on Windows, and must be fixed.
|
|
|
|
|
|
| |
Consistently capture the last Windows error code in the global variable
winerrno. Add logging macros that report the Windows error message for
this error code.
|
|
|
|
| |
Timer.cpp.
|
| |
|
|
|
|
| |
Allows Archive to be used safely on network streams.
|
| |
|
| |
|
|
|
|
|
| |
Should make the Travis logs shorter and more readable.
|
|
|
|
|
|
| |
We have more fine-grained control over logging now, including ability to log
to a file in bbackupquery and all daemons, and users can't redirect stderr on
Windows. https://www.boxbackup.org/ticket/50
|
| |
|
|
|
|
|
|
| |
We need to use the saved Windows error code from GetLastError(), rather than
calling it again, because another system call has run in the mean time and
GetLastError() will now return 0.
|
|
|
|
|
|
| |
Fixes tests broken by changing current directory, for example in bbackupquery,
which meant that the report file was written in the wrong place and couldn't
be found by the test, causing a failure.
|
| |
|
| |
|
|
|
|
|
| |
This is better for C++ style and potential missing null termination.
|
| |
|
|
|
|
|
|
|
| |
Reduce precision in log messages from microseconds to milliseconds.
Log the amount of time actually slept in ShortSleep().
|
|
|
|
|
|
| |
There's not much point logging with higher precision when no normal platform
will deliver it.
|
| |
|
| |
|
| |
|
|
|
|
| |
Prevents backup log files from becoming too large.
|
|
|
|
|
|
| |
Thanks to Jean-Yves Moulin for reporting this issue. When bbackupd is configured
to create locations whose names contain a slash, it was impossible to escape it,
and thus to enter the directory in bbackupquery to inspect or restore it.
|
| |
|
| |
|
|
|
|
| |
Helps track down missing network operation timeouts.
|
|
|
|
|
| |
Reduces warnings about network operations with no timeout. May prevent some
hangs that might have occurred waiting forever for network data in the past.
|
|
|
|
| |
This is needed by the refactored bbackupd tests.
|
|
|
|
|
|
|
|
| |
StreamDataLeft() incorrectly returned false when there was still data
buffered, which made IOStream::CopyStreamTo stop copying early, resulting
in incomplete files when copying data out of a BufferedStream. This meant
that tests involving a local protocol, where a BufferedStream was copied
directly to a RaidFile, resulted in corrupted files that would not verify.
|
|
|
|
| |
Merged back changes from the test refactor branch to reduce diffs.
|
|
|
|
|
|
| |
Avoid duplicate reporting, and include a message in the exceptions thrown.
Merged back changes from the test refactor branch to reduce diffs.
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
| |
Hopefully all of these changes are inconsequential.
Merged back changes from the test refactor branch to reduce diffs.
|
| |
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
| |
Conflicts:
bin/bbackupd/BackupClientDirectoryRecord.cpp
|
| |
|
|
|
|
|
| |
Useful to help debug problems such as invalid file headers when the source
of the stream might not be too obvious.
|
|
|
|
| |
Allows command-line tools to reuse the same option processing.
|
|
|
|
|
| |
Report the exception message details if it's a BoxException, so it's more
user friendly.
|
|
|
|
|
| |
Use the standard macros to report file error messages in the standard
format, including a filename and message in the exception.
|
|
|
|
| |
Useful in testing whether code logs the expected messages or not.
|
|
|
|
| |
This is very useful with the forthcoming Capture logger.
|