[Box Backup-commit] [boxbackup/boxbackup] 974c8b: Refactor headers to reduce coupling

GitHub noreply at github.com
Mon Feb 19 16:47:56 GMT 2018


  Branch: refs/heads/s3_support
  Home:   https://github.com/boxbackup/boxbackup
  Commit: 974c8b8924ded346b4c58754ba6b530d128afdb7
      https://github.com/boxbackup/boxbackup/commit/974c8b8924ded346b4c58754ba6b530d128afdb7
  Author: Chris Wilson <chris+github at qwirx.com>
  Date:   2018-02-19 (Mon, 19 Feb 2018)

  Changed paths:
    M lib/backupclient/BackupClientCryptoKeys.cpp
    M lib/backupclient/BackupClientCryptoKeys.h
    M lib/backupclient/BackupClientRestore.h
    M lib/backupstore/BackupProtocol.h
    M lib/backupstore/BackupStoreAccountDatabase.h
    M lib/backupstore/BackupStoreCheck2.cpp
    M lib/backupstore/BackupStoreDirectory.h
    M lib/backupstore/BackupStoreFile.cpp
    M lib/backupstore/BackupStoreFile.h
    M lib/backupstore/BackupStoreFileDiff.cpp
    M lib/backupstore/BackupStoreFileEncodeStream.cpp
    M lib/backupstore/BackupStoreFileEncodeStream.h
    M lib/backupstore/BackupStoreFilenameClear.cpp
    M lib/backupstore/BackupStoreFilenameClear.h
    M lib/backupstore/BackupStoreObjectDump.cpp
    M lib/backupstore/StoreTestUtils.cpp
    M lib/backupstore/StoreTestUtils.h
    M lib/bbackupd/BackupClientDeleteList.cpp
    M lib/bbackupd/BackupClientDeleteList.h
    M lib/bbackupd/BackupClientInodeToIDMap.h
    M lib/bbackupd/BackupDaemonInterface.h
    M lib/bbackupd/Win32ServiceFunctions.cpp
    M lib/bbackupd/Win32ServiceFunctions.h
    M lib/bbackupquery/BoxBackupCompareParams.h
    M lib/bbackupquery/CommandCompletion.cpp
    M lib/bbstored/BBStoreDHousekeeping.cpp
    M lib/bbstored/BackupStoreDaemon.cpp
    M lib/bbstored/BackupStoreDaemon.h
    M lib/common/Box.h
    M lib/common/BoxException.h
    M lib/common/BoxTime.cpp
    M lib/common/BoxTime.h
    M lib/common/BufferedStream.cpp
    M lib/common/BufferedStream.h
    M lib/common/BufferedWriteStream.cpp
    M lib/common/Configuration.h
    M lib/common/ConversionString.cpp
    M lib/common/DebugMemLeakFinder.cpp
    A lib/common/Exception.h
    M lib/common/FdGetLine.cpp
    M lib/common/FileStream.cpp
    M lib/common/FileStream.h
    M lib/common/Guards.h
    M lib/common/IOStream.cpp
    M lib/common/IOStream.h
    M lib/common/IOStreamGetLine.cpp
    M lib/common/InvisibleTempFileStream.h
    M lib/common/LineBuffer.cpp
    M lib/common/LineBuffer.h
    M lib/common/Logging.cpp
    M lib/common/Logging.h
    M lib/common/MainHelper.cpp
    M lib/common/MemBlockStream.cpp
    M lib/common/MemBlockStream.h
    M lib/common/MemLeakFindOn.h
    M lib/common/MemLeakFinder.h
    M lib/common/NamedLock.cpp
    M lib/common/NamedLock.h
    M lib/common/PartialReadStream.cpp
    M lib/common/RateLimitingStream.cpp
    M lib/common/ReadGatherStream.cpp
    M lib/common/ReadLoggingStream.cpp
    M lib/common/StreamableMemBlock.cpp
    M lib/common/Test.cpp
    M lib/common/Test.h
    M lib/common/Timer.cpp
    M lib/common/Timer.h
    M lib/common/UnixUser.cpp
    M lib/common/UnixUser.h
    M lib/common/Utils.cpp
    M lib/common/WaitForEvent.cpp
    M lib/common/ZeroStream.cpp
    M lib/common/makeexception.pl.in
    M lib/compress/Compress.h
    M lib/compress/CompressStream.cpp
    M lib/crypto/CipherAES.cpp
    M lib/crypto/CipherAES.h
    M lib/crypto/CipherBlowfish.cpp
    M lib/crypto/CipherContext.cpp
    M lib/crypto/CipherContext.h
    M lib/crypto/CipherDescription.h
    M lib/crypto/CryptoUtils.cpp
    M lib/crypto/CryptoUtils.h
    M lib/crypto/MD5Digest.h
    M lib/crypto/Random.cpp
    M lib/httpserver/HTTPHeaders.cpp
    M lib/httpserver/HTTPQueryDecoder.cpp
    M lib/httpserver/HTTPQueryDecoder.h
    M lib/httpserver/HTTPServer.cpp
    M lib/httpserver/HTTPServer.h
    M lib/httpserver/S3Simulator.h
    M lib/httpserver/decode.h
    M lib/httpserver/encode.h
    M lib/intercept/intercept.cpp
    M lib/raidfile/RaidFileController.cpp
    M lib/raidfile/RaidFileRead.cpp
    M lib/raidfile/RaidFileRead.h
    M lib/raidfile/RaidFileUtil.cpp
    M lib/raidfile/RaidFileUtil.h
    M lib/server/LocalProcessStream.cpp
    M lib/server/LocalProcessStream.h
    M lib/server/Message.cpp
    M lib/server/Message.h
    M lib/server/Protocol.cpp
    M lib/server/ProtocolUncertainStream.cpp
    M lib/server/SSLLib.cpp
    M lib/server/ServerControl.cpp
    M lib/server/ServerControl.h
    M lib/server/ServerStream.h
    M lib/server/ServerTLS.h
    M lib/server/Socket.cpp
    M lib/server/SocketListen.h
    M lib/server/SocketStream.cpp
    M lib/server/SocketStream.h
    M lib/server/SocketStreamTLS.cpp
    M lib/server/TLSContext.cpp
    M lib/server/WinNamedPipeListener.h
    M lib/server/WinNamedPipeStream.cpp
    M lib/server/WinNamedPipeStream.h
    M lib/server/makeprotocol.pl.in

  Log Message:
  -----------
  Refactor headers to reduce coupling

Remove Logging and BoxException dependencies, ASSERT and THROW_* macros from
Box.h, move them into a new header, Exception.h (not to be confused with
BoxException.h, which just declares the BoxException class).

This unfortunately means that a lot of C++ files now need to include
Exception.h, and many more that silently depended on <string> being imported
now need to import it themselves, or just forward-declare it if they don't need
a definition.

Also simplify the logic for enabling memory leak detection. It's now always on
in debug builds unless disabled by defining PLATFORM_DISABLE_MEM_LEAK_TESTING
(which only Windows does) and always off in release builds.


  Commit: 39b45a4f6f9f90f7557865910f20cd5edd5d6f89
      https://github.com/boxbackup/boxbackup/commit/39b45a4f6f9f90f7557865910f20cd5edd5d6f89
  Author: Chris Wilson <chris+github at qwirx.com>
  Date:   2018-02-19 (Mon, 19 Feb 2018)

  Changed paths:
    M lib/common/LineBuffer.h

  Log Message:
  -----------
  LineBuffer.h: update header comment and #include guard for new filename


  Commit: 301ccbbadbd7cd8e292c4c87ad37b51bfe26a26e
      https://github.com/boxbackup/boxbackup/commit/301ccbbadbd7cd8e292c4c87ad37b51bfe26a26e
  Author: Chris Wilson <chris+github at qwirx.com>
  Date:   2018-02-19 (Mon, 19 Feb 2018)

  Changed paths:
    M lib/common/Logging.cpp
    M lib/common/Logging.h
    M test/common/testcommon.cpp

  Log Message:
  -----------
  Logging: improve performance by not generating message unnecessarily

Avoid building an ostringstream, writing all logged values to it and converting
it to a string, for log messages that no logger is currently interested in
(e.g. TRACE logging most of the time). Cache this "lowest common log level" and
update it when any logger is reconfigured, added or removed.


  Commit: fc62ef3fffc9cb0b82ee7c66bee633099d97b76a
      https://github.com/boxbackup/boxbackup/commit/fc62ef3fffc9cb0b82ee7c66bee633099d97b76a
  Author: Chris Wilson <chris+github at qwirx.com>
  Date:   2018-02-19 (Mon, 19 Feb 2018)

  Changed paths:
    M lib/httpserver/HTTPQueryDecoder.cpp

  Log Message:
  -----------
  HTTPQueryDecoder::URLEncode: speed up by processing larger chunks

Scan the string for characters which need URL-encoding and append the substring
before that in one go. If the entire string does not need URL-encoding, just
return it without any further processing.


  Commit: d0396c2941e39fa3785133a4f6deb47afddd8c16
      https://github.com/boxbackup/boxbackup/commit/d0396c2941e39fa3785133a4f6deb47afddd8c16
  Author: Chris Wilson <chris+github at qwirx.com>
  Date:   2018-02-19 (Mon, 19 Feb 2018)

  Changed paths:
    M lib/common/Utils.cpp

  Log Message:
  -----------
  Fix incorrect use of abi::__cxa_demangle

The buffer, if passed, should be allocated with malloc, not statically. In this
case we don't need to allocate one first, we can use the default behaviour
where abi::__cxa_demangle allocates one for us.


  Commit: d48cae211f4ae1153a0e4811ce57bd23c674507f
      https://github.com/boxbackup/boxbackup/commit/d48cae211f4ae1153a0e4811ce57bd23c674507f
  Author: Chris Wilson <chris+github at qwirx.com>
  Date:   2018-02-19 (Mon, 19 Feb 2018)

  Changed paths:
    M test/basicserver/testbasicserver.cpp

  Log Message:
  -----------
  Add more logging to test/basicserver for FreeBSD timeouts

(cherry picked from commit 2bfbf2995a09a6ce62a96c2bc07da6b88e014da6)


Compare: https://github.com/boxbackup/boxbackup/compare/6bb9951143d5...d48cae211f4a


More information about the Boxbackup-commit mailing list