merged changes from RC_0_16
This commit is contained in:
parent
1bfa04eabc
commit
d9b37f05cc
|
@ -4606,7 +4606,7 @@ namespace libtorrent
|
|||
#endif
|
||||
return m_ses.m_upload_rate.request_bandwidth(self()
|
||||
, (std::max)(m_send_buffer.size(), m_statistics.upload_rate() * 2
|
||||
/ (1000 / m_ses.m_settings.tick_interval))
|
||||
* m_ses.m_settings.tick_interval / 1000)
|
||||
, priority
|
||||
, bwc1, bwc2, bwc3, bwc4);
|
||||
}
|
||||
|
@ -4638,8 +4638,7 @@ namespace libtorrent
|
|||
TORRENT_ASSERT((m_channel_state[download_channel] & peer_info::bw_limit) == 0);
|
||||
return m_ses.m_download_rate.request_bandwidth(self()
|
||||
, (std::max)((std::max)(m_outstanding_bytes, m_packet_size - m_recv_pos) + 30
|
||||
, m_statistics.download_rate() * 2
|
||||
/ (1000 / m_ses.m_settings.tick_interval))
|
||||
, m_statistics.download_rate() * 2 * m_ses.m_settings.tick_interval / 1000)
|
||||
, priority , bwc1, bwc2, bwc3, bwc4);
|
||||
}
|
||||
|
||||
|
|
|
@ -1682,6 +1682,8 @@ bool utp_socket_impl::send_pkt(int flags)
|
|||
stack_alloced = true;
|
||||
#endif
|
||||
TORRENT_ASSERT(force);
|
||||
// TODO: 3 this alloca() statement won't necessariky produce
|
||||
// correctly aligned memory. do something about that
|
||||
p = (packet*)TORRENT_ALLOCA(char, sizeof(packet) + packet_size);
|
||||
UTP_LOGV("%8p: allocating %d bytes on the stack\n", this, packet_size);
|
||||
p->allocated = packet_size;
|
||||
|
|
Loading…
Reference in New Issue