diff options
Diffstat (limited to 'TAO/tao')
-rw-r--r-- | TAO/tao/Compression/lzo/LzoCompressor.cpp | 4 | ||||
-rw-r--r-- | TAO/tao/Compression/zlib/ZlibCompressor.cpp | 9 |
2 files changed, 6 insertions, 7 deletions
diff --git a/TAO/tao/Compression/lzo/LzoCompressor.cpp b/TAO/tao/Compression/lzo/LzoCompressor.cpp index e84b7d931e8..c67b4a25ec8 100644 --- a/TAO/tao/Compression/lzo/LzoCompressor.cpp +++ b/TAO/tao/Compression/lzo/LzoCompressor.cpp @@ -39,7 +39,7 @@ LzoCompressor::compress ( if (retval != LZO_E_OK) { - throw ::Compression::CompressionException (retval); + throw ::Compression::CompressionException (retval, ""); } else { @@ -66,7 +66,7 @@ LzoCompressor::decompress ( if (retval != LZO_E_OK) { - throw ::Compression::CompressionException (retval); + throw ::Compression::CompressionException (retval, ""); } else { diff --git a/TAO/tao/Compression/zlib/ZlibCompressor.cpp b/TAO/tao/Compression/zlib/ZlibCompressor.cpp index 45c27e26765..85ce653b9a5 100644 --- a/TAO/tao/Compression/zlib/ZlibCompressor.cpp +++ b/TAO/tao/Compression/zlib/ZlibCompressor.cpp @@ -23,8 +23,8 @@ ZlibCompressor::compress ( ::Compression::Buffer & target ) { - uLongf max_length = - static_cast <uLongf> (source.length () * 1.1) + TAO_GIOP_MESSAGE_HEADER_LEN; + uLongf max_length = + static_cast <uLongf> (source.length () * 1.1); target.length (static_cast <CORBA::ULong> (max_length)); int const retval = ::compress2 (reinterpret_cast <Bytef*>(target.get_buffer ()), @@ -35,14 +35,13 @@ ZlibCompressor::compress ( if (retval != Z_OK) { - throw ::Compression::CompressionException (retval, - CORBA::string_dup("")); + throw ::Compression::CompressionException (retval, ""); } else { target.length (static_cast <CORBA::ULong> (max_length)); } - + // Update statistics for this compressor this->update_stats (source.length (), target.length ()); } |