Ticket #7859: asiossl.patch

File asiossl.patch, 1.6 KB (added by itsme@…, 10 years ago)

proposed change to asio/ssl/engine

  • boost/asio/ssl/detail/engine.hpp

    old new  
    9494      boost::system::error_code& ec, std::size_t& bytes_transferred);
    9595
    9696  // Get output data to be written to the transport.
    97   BOOST_ASIO_DECL boost::asio::mutable_buffers_1 get_output(
     97  BOOST_ASIO_DECL boost::asio::const_buffers_1 get_output(
    9898      const boost::asio::mutable_buffer& data);
    9999
    100100  // Put input data that was read from the transport.
  • boost/asio/ssl/detail/impl/engine.ipp

    old new  
    162161      boost::asio::buffer_size(data), ec, &bytes_transferred);
    163162}
    164163
    165 boost::asio::mutable_buffers_1 engine::get_output(
     164boost::asio::const_buffers_1 engine::get_output(
    166165    const boost::asio::mutable_buffer& data)
    167166{
    168167  int length = ::BIO_read(ext_bio_,
    169168      boost::asio::buffer_cast<void*>(data),
    170       static_cast<int>(boost::asio::buffer_size(data)));
     169      boost::asio::buffer_size(data));
    171170
    172   return boost::asio::buffer(data,
     171  return boost::asio::buffer((const void*)boost::asio::buffer_cast<void*>(data),
    173172      length > 0 ? static_cast<std::size_t>(length) : 0);
    174173}
    175174
     
    178177{
    179178  int length = ::BIO_write(ext_bio_,
    180179      boost::asio::buffer_cast<const void*>(data),
    181       static_cast<int>(boost::asio::buffer_size(data)));
     180      boost::asio::buffer_size(data));
    182181
    183182  return boost::asio::buffer(data +
    184183      (length > 0 ? static_cast<std::size_t>(length) : 0));