summaryrefslogtreecommitdiff
path: root/lib
Commit message (Collapse)AuthorAge
* Fix getopt header confusion.Chris Wilson2013-09-30
| | | | | | | | Our copy of getopt.h in lib/win32 was beating the system getopt.h in the search path, and providing different definitions, which clang picked up. Renamed our getopt.h to bsd_getopt.h, and added a box_getopt.h to decide whether to include this one instead of the system getopt.h.
* Clang complains that numDelObj is not initialised.Chris Wilson2013-09-28
| | | | | | | I don't think this has any effect in practice, but this patch ensures that it is initialised anyway.
* mSubType is unsigned, so clang complains that it can't be less than zero.Chris Wilson2013-09-28
|
* Repair damaged Box RAID objects and non-transformed .rfw files.Chris Wilson2013-09-20
|
* Add a comment about removing one RaidFileWrite constructor.Chris Wilson2013-09-20
|
* Ensure that all errors that increment mNumberErrorsFound are reported as ↵Chris Wilson2013-09-19
| | | | | | | BOX_ERROR. Remove debugging code for Sune Molgaard's issue with non-existent files.
* Add calloc() support to memory leak finder.Chris Wilson2013-09-19
|
* Report everything that increases mNumberErrorsFound as a BOX_ERROR.Chris Wilson2013-09-19
|
* Add missing definition of CheckDirectory, fix CheckDirectoryEntry prototype.Chris Wilson2013-09-19
|
* Fix misleading exception thrown.Chris Wilson2013-09-19
|
* Repeatedly "fix" directories until all errors are cleared.Chris Wilson2013-09-19
| | | | | | | Fixes some cases where a directory might refer to an object that doesn't exist, which is removed from the directory, but an object that depends on it (a patch) isn't removed, and requires a subsequent recheck.
* Fix missing include, thanks Arnaud.Chris Wilson2013-09-02
|
* Set process title on Windows.Chris Wilson2013-08-25
| | | | | | Thanks to Arnaud for submitting the patch: "I propose a little patch to enable the SetProcessTitle function on windows system."
* Improve debugging messages after repairing a directory.Chris Wilson2013-08-22
| | | | | | | | | | | Report whether the directory still had errors after the first pass of dir.CheckAndFix(), and also whether a file is marked as both Old and Deleted, which means that its block usage is not accounted for anywhere. There's possibly still a bug here where an invalid directory entry that is itself a directory may not result in the parent directory being marked as isModified and written back out afterwards, which may be what's happening to Markus Grunwald (failure to correct the error with "check fix").
* Fix a bug where bbstoreaccounts check could hang or crash.Chris Wilson2013-08-22
| | | | | | | It's not safe to use an iterator after the underlying collection has been modified. We need to restart iterating over the directory in that case. Otherwise we could loop forever looking for an end() that we've already passed, or start accessing unallocated memory.
* 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.
* Add a ToString() method on protocol objects, to help with debugging them.Chris Wilson2013-08-21
|
* Allow getting the name of the current phase of a BackupStoreContext.Chris Wilson2013-08-21
| | | | | Useful for debugging when the phase is not as expected.
* Pass std::strings to functions instead of const char *, for C++ style.Chris Wilson2013-08-21
|
* Add ability to generate memory usage reports while running.Chris Wilson2013-02-13
| | | | | | | | | | | | * ./configure CXXFLAGS=-DDEBUG_LEAKS * Build and run the binary as normal (release or debug) * Send SIGUSR1 to the process (e.g. killall -USR1 bbstored) * Check the system logs, or the console. Not safe for use on a production process, as it does illegal things in a signal handler that may result in the process hanging. Use only for debugging, and be prepared to kill any stuck processes.
* Allow getting the standard Console and Syslog loggers. Add a Guard classChris Wilson2012-11-27
| | | | | that can be used to protect against permanent changes to their log levels.
* Use THROW macro to report error getting file attributes.Chris Wilson2012-11-27
|
* Cosmetic improvements to bbstored log message tagging.Chris Wilson2012-11-18
|
* Finish incomplete checkin [3156].Chris Wilson2012-11-18
|
* Add a helper in BackupStoreAccounts to get a write lock on an account.Chris Wilson2012-11-18
| | | | | | Use it in two places to simplify code (not in BackupStoreContext yet, because that wants to communicate with HK process as well).
* Allow passing a std::string instead of char* to BackupStoreAccountDatabase,Chris Wilson2012-11-18
| | | | | for C++ style.
* Fix duplicate tagging of housekeeping messages.Chris Wilson2012-11-17
|
* Fix missing space in log message.Chris Wilson2012-11-17
|
* Use more efficient direct reset of Timers instead of assignment.Chris Wilson2012-11-17
|
* Fix timer miscalculation on Windows.Chris Wilson2012-11-17
|
* Ensure that newly created accounts are enabled by default.Chris Wilson2012-11-08
|
* Fix missing #include for MemBlockStream.hChris Wilson2012-11-08
|
* Make CreateForRegeneration save the AccountEnabled flag and any extra dataChris Wilson2012-11-08
| | | | | copied from the original info file.
* Allow constructing an empty MemBlockStream, as it's useful for tests.Chris Wilson2012-11-08
|
* Remove commented-out method copied from BackupStoreInfo and not used.Chris Wilson2012-11-07
|
* Replace magic number 1000 with MILLI_SEC_IN_SEC when initialising timers.Chris Wilson2012-11-07
| | | | | Add the start of ExperimentalSnapshotMode support.
* Fix incorrect logging of timer assignment, and format expiry time as a human ↵Chris Wilson2012-11-07
| | | | time.
* Refactor and improve timer trace logging, fix subsecond formatting error.Chris Wilson2012-11-07
|
* BOX_FORMAT_MICROSECONDS doesn't make sense unless the digits to the rightChris Wilson2012-11-07
| | | | | of the decimal point are padded properly.
* Log the number of nanoseconds left to sleep, otherwise the log messagesChris Wilson2012-11-07
| | | | | don't make sense.
* Convert FORMAT_MICROSECONDS into a global utility macro.Chris Wilson2012-11-06
|
* Refuse login to disabled accounts.Chris Wilson2012-10-22
|
* Keep and resave any extra data present at the end of a BackupStoreInfoChris Wilson2012-10-22
| | | | | | | | | version 2 (Archive) file, for forwards compatibility with future extensions to the file format. Add a flag for whether an account in enabled or not in the new v2 file format, and if it's not present, default to true.
* Add helper methods to get read-only access to the buffer, and its size,Chris Wilson2012-10-22
| | | | | wrapped by a MemBlockStream.
* Add a comment in header to indicate that StreamableMemBlock does not Chris Wilson2012-10-22
| | | | | | read/write raw memory blocks, but blocks with a header indicating their size, which is not always what we want.
* Add helper method to read a value that might not be present in an ArchiveChris Wilson2012-10-22
| | | | | (end of Archive) to avoid duplicating this code many times.
* Wrap line for readability.Chris Wilson2012-10-22
|
* Log the number of the disc set that didn't exist, and the number actually ↵Chris Wilson2012-10-22
| | | | configured.