summaryrefslogtreecommitdiff
path: root/lib/server
Commit message (Collapse)AuthorAge
* Remove non-standard BSD u_int* types.Chris Wilson2015-12-08
| | | | | | | MSVC doesn't like them, and they're not necessary now that we have stdint.h. Remove some compatibility typedefs from BoxPlatform.h and emu.h which are not needed any longer either.
* Handle generic exceptions by returning an Error message with correct Type.Chris Wilson2015-08-06
|
* Fix return types for integer function to be integersChris Wilson2015-08-06
|
* Shorten minimum sleep while waiting for test daemons to dieChris Wilson2015-08-06
|
* Fix ServerStream logging too many messages when waiting for a child to die.Chris Wilson2015-07-31
| | | | Detect that there are no remaining children to wait for, and return quietly.
* Refactor to allow sharing code for starting and stopping daemons in tests.Chris Wilson2015-07-31
| | | | | The new StartDaemon() and StopDaemon() in ServerControl.cpp/h are generic, and used by StartClient() and StartServer() in StoreTestUtils.cpp/h.
* Refactor to allow non-bbstored store configurations.Chris Wilson2015-06-28
| | | | | | Make some keys not required in BackupDaemonConfigVerify, and verify them afterwards instead, when the rest of the configuration file has been read (and in future, the store type would be known.)
* Add command-line help to test executables.Chris Wilson2015-06-10
|
* Define BOX_SOCKET_ERROR_MESSAGE, replace more BOX_LOG_SOCKET_ERROR calls ↵Chris Wilson2015-04-15
| | | | with it.
* Use THROW_EXCEPTION_MESSAGE macro to save a message in exceptions.Chris Wilson2015-04-15
|
* Whitespace and semicolon-after-macro fixes.Chris Wilson2015-04-06
|
* Fix overlapped I/O in WinNamedPipeStream.Chris Wilson2014-12-28
| | | | Broken by previous changes to introduce overlapped I/O for writes.
* Whitespace and comment fixes.Chris Wilson2014-12-28
| | | | Improve correctness and reduce code duplication in bbackupctl.
* Improve debugging of named pipe operations and bbackupctl pipe interaction.Chris Wilson2014-12-28
|
* Add missing timeouts on command socket writes.Chris Wilson2014-12-28
|
* Add comment about reason for code duplication.Chris Wilson2014-12-26
| | | | | The mysterious case of the missing Write(const std::string&) in the night-time, or rather in subclasses of IOStream which declares it.
* Add support for timeouts on named pipe writes, using overlapped I/O.Chris Wilson2014-12-26
|
* Fix warning about HAVE_RANDOM_DEVICE not being defined.Chris Wilson2014-12-26
|
* Replace sprintf() with snprintf(), fixes compile warnings on OpenBSD.Chris Wilson2014-12-22
| | | | | And compile errors on recent MinGW.
* 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.
* Allow writing a std::string to any SocketStream.Chris Wilson2014-12-21
|
* Improve comment explaining SocketStream::PollTimeout function.Chris Wilson2014-12-21
|
* Add a note about units of arguments to PollTimeout function().Chris Wilson2014-12-15
| | | | | Because they're not obvious and I wasted time trying to figure them out.
* Fix stupid typo on struct member names.Chris Wilson2014-12-06
|
* Add support for getsockopt(SO_PEERCRED) on OpenBSD 5.2.Chris Wilson2014-12-06
| | | | | | | | | | | OpenBSD requires different headers to be included, including a bug which makes it essential to include sys/param.h before sys/ucred.h, and gives the fields of struct ucred different names than Linux does. This fixes compilation on OpenBSD and allows the user connecting to a UNIX socket to be checked, increasing security of the command socket on this platform.
* Generate configure script in qdbm directory.Chris Wilson2014-12-01
| | | | | | Now that we've removed it from version control, we need to build it from configure.in as part of bootstrapping Box Backup.
* Fix exception in bbackupd when no LogFile is configured.Chris Wilson2014-11-23
|
* Fix compile errors on Windows, thanks to Kai Liebenau for the patch.Chris Wilson2014-11-16
|
* Add option to truncate log file at start of every backup.Chris Wilson2014-11-16
| | | | Prevents backup log files from becoming too large.
* 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.
* optlen could become bigger than sizeof(info) in future and that's OKChris Wilson2014-09-18
|
* Add check for trying to ReceiveStream when no stream availableChris Wilson2014-09-18
|
* Update comment to match current method nameChris Wilson2014-09-18
|
* Whitespace fixesChris Wilson2014-09-18
|
* Improve exception message if a Daemon is used without being configured firstChris 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.
* Fix poll timeout calculation for infinite timeouts.Chris Wilson2014-08-15
|
* Whitespace fixes.Chris Wilson2014-08-15
|
* Add missing timeouts for network operations.Chris Wilson2014-08-15
|
* Fix deadlock waiting for read or write on closed connection.Chris Wilson2014-08-15
| | | | | | | | 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.
* 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.
* Whitespace, wrapping, comments and dead code cleanups.Chris Wilson2014-08-15
| | | | | | | | Conflicts: bin/bbackupd/BackupDaemon.cpp bin/bbackupd/BackupDaemon.h test/bbackupd/testbbackupd.cpp
* 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
* Fix compilation on Debian 7 (Wheezy) by including bsd/unistd.h.Chris Wilson2014-04-12
| | | | | | | If libedit is installed then -ledit will be detected and added to the link line, which makes the test for getpeereid pass. Then SocketStream.cpp tries to use it, but that won't work unless we include bsd/unistd.h where the prototype is declared.
* Refactor logging option processing out of Daemon class.Chris Wilson2014-04-09
| | | | Allows command-line tools to reuse the same option processing.
* 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
|