[Box Backup-commit] [boxbackup/boxbackup] 0eb532: Refactor headers to reduce coupling

GitHub noreply at github.com
Sun Feb 18 22:00:24 GMT 2018


  Branch: refs/heads/s3_support
  Home:   https://github.com/boxbackup/boxbackup
  Commit: 0eb53246065c01f6e5ca74296f955b09f1ea8eaf
      https://github.com/boxbackup/boxbackup/commit/0eb53246065c01f6e5ca74296f955b09f1ea8eaf
  Author: Chris Wilson <chris+github at qwirx.com>
  Date:   2018-02-18 (Sun, 18 Feb 2018)

  Changed paths:
    M lib/backupclient/BackupClientCryptoKeys.cpp
    M lib/backupstore/BackupStoreCheck2.cpp
    M lib/backupstore/BackupStoreDirectory.h
    M lib/backupstore/BackupStoreFile.cpp
    M lib/backupstore/BackupStoreFileDiff.cpp
    M lib/backupstore/BackupStoreFileEncodeStream.cpp
    M lib/backupstore/BackupStoreFilenameClear.cpp
    M lib/backupstore/BackupStoreObjectDump.cpp
    M lib/backupstore/StoreTestUtils.cpp
    M lib/bbackupd/BackupClientDeleteList.cpp
    M lib/bbackupd/BackupClientInodeToIDMap.h
    M lib/bbackupd/BackupDaemonInterface.h
    M lib/bbackupd/Win32ServiceFunctions.cpp
    M lib/bbackupquery/BoxBackupCompareParams.h
    M lib/bbackupquery/CommandCompletion.cpp
    M lib/bbstored/BBStoreDHousekeeping.cpp
    M lib/bbstored/BackupStoreDaemon.cpp
    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/IOStreamGetLine.cpp
    M lib/common/LineBuffer.cpp
    M lib/common/LineBuffer.h
    M lib/common/Logging.cpp
    M lib/common/MainHelper.cpp
    M lib/common/MemBlockStream.cpp
    M lib/common/MemLeakFindOn.h
    M lib/common/MemLeakFinder.h
    M lib/common/NamedLock.cpp
    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/Timer.cpp
    M lib/common/UnixUser.cpp
    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/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/HTTPServer.cpp
    M lib/intercept/intercept.cpp
    M lib/raidfile/RaidFileController.cpp
    M lib/raidfile/RaidFileRead.cpp
    M lib/raidfile/RaidFileUtil.cpp
    M lib/raidfile/RaidFileUtil.h
    M lib/server/LocalProcessStream.cpp
    M lib/server/Message.cpp
    M lib/server/Protocol.cpp
    M lib/server/ProtocolUncertainStream.cpp
    M lib/server/SSLLib.cpp
    M lib/server/ServerControl.cpp
    M lib/server/Socket.cpp
    M lib/server/SocketListen.h
    M lib/server/SocketStream.cpp
    M lib/server/SocketStreamTLS.cpp
    M lib/server/TLSContext.cpp
    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: 745f6b5cb8222310ea9f21ae087fded3d22a6917
      https://github.com/boxbackup/boxbackup/commit/745f6b5cb8222310ea9f21ae087fded3d22a6917
  Author: Chris Wilson <chris+github at qwirx.com>
  Date:   2018-02-18 (Sun, 18 Feb 2018)

  Changed paths:
    M lib/common/LineBuffer.h

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


  Commit: adc054b129ed9067b2d7341975b5d671a6b17e0c
      https://github.com/boxbackup/boxbackup/commit/adc054b129ed9067b2d7341975b5d671a6b17e0c
  Author: Chris Wilson <chris+github at qwirx.com>
  Date:   2018-02-18 (Sun, 18 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: a6ff6bc77a0d4ba6f7d6a440a9438a4f954baa73
      https://github.com/boxbackup/boxbackup/commit/a6ff6bc77a0d4ba6f7d6a440a9438a4f954baa73
  Author: Chris Wilson <chris+github at qwirx.com>
  Date:   2018-02-18 (Sun, 18 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: 833fa4aa3d152ba060a9cbbbb9ee2b9d3ee50484
      https://github.com/boxbackup/boxbackup/commit/833fa4aa3d152ba060a9cbbbb9ee2b9d3ee50484
  Author: Chris Wilson <chris+github at qwirx.com>
  Date:   2018-02-18 (Sun, 18 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: 6bb9951143d58bceb2ac1b12bd7efc04ba7ace0a
      https://github.com/boxbackup/boxbackup/commit/6bb9951143d58bceb2ac1b12bd7efc04ba7ace0a
  Author: Chris Wilson <chris+github at qwirx.com>
  Date:   2018-02-18 (Sun, 18 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/8c91157e032e...6bb9951143d5


More information about the Boxbackup-commit mailing list