more asserts around send buffers and fixes potential race condition

This commit is contained in:
Arvid Norberg
2007-12-27 21:43:11 +00:00
parent 8a47c849ce
commit cfe5c8962e
3 changed files with 10 additions and 0 deletions

View File

@@ -2607,6 +2607,7 @@ namespace libtorrent
// return value is destructed
buffer::interval peer_connection::allocate_send_buffer(int size)
{
TORRENT_ASSERT(size > 0);
char* insert = m_send_buffer.allocate_appendix(size);
if (insert == 0)
{