forked from premiere/premiere-libtorrent
fix potential bug (and warning on sunpro) in the send_buffer signature
This commit is contained in:
parent
8030454c96
commit
37c48117b0
|
@ -275,7 +275,7 @@ public:
|
||||||
// these functions encrypt the send buffer if m_rc4_encrypted
|
// these functions encrypt the send buffer if m_rc4_encrypted
|
||||||
// is true, otherwise it passes the call to the
|
// is true, otherwise it passes the call to the
|
||||||
// peer_connection functions of the same names
|
// peer_connection functions of the same names
|
||||||
void send_buffer(char* buf, int size, int flags = 0);
|
void send_buffer(char const* buf, int size, int flags = 0);
|
||||||
buffer::interval allocate_send_buffer(int size);
|
buffer::interval allocate_send_buffer(int size);
|
||||||
template <class Destructor>
|
template <class Destructor>
|
||||||
void append_send_buffer(char* buffer, int size, Destructor const& destructor)
|
void append_send_buffer(char* buffer, int size, Destructor const& destructor)
|
||||||
|
|
|
@ -606,13 +606,13 @@ namespace libtorrent
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void bt_peer_connection::send_buffer(char* buf, int size, int flags)
|
void bt_peer_connection::send_buffer(char const* buf, int size, int flags)
|
||||||
{
|
{
|
||||||
TORRENT_ASSERT(buf);
|
TORRENT_ASSERT(buf);
|
||||||
TORRENT_ASSERT(size > 0);
|
TORRENT_ASSERT(size > 0);
|
||||||
|
|
||||||
if (m_encrypted && m_rc4_encrypted)
|
if (m_encrypted && m_rc4_encrypted)
|
||||||
m_RC4_handler->encrypt(buf, size);
|
m_RC4_handler->encrypt(const_cast<char*>(buf), size);
|
||||||
|
|
||||||
peer_connection::send_buffer(buf, size, flags);
|
peer_connection::send_buffer(buf, size, flags);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue