Changeset 1058 for trunk/libtorrent/src/protocol/handshake.cc
- Timestamp:
- 05/05/08 15:16:26 (4 years ago)
- Files:
-
- 1 modified
-
trunk/libtorrent/src/protocol/handshake.cc (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/libtorrent/src/protocol/handshake.cc
r1034 r1058 527 527 // The download is just starting so we're not sending any 528 528 // bitfield. Pretend we wrote it already. 529 if (m_download->file_list()->bitfield()->is_all_unset() )529 if (m_download->file_list()->bitfield()->is_all_unset() || m_download->initial_seeding() != NULL) { 530 530 m_writePos = m_download->file_list()->bitfield()->size_bytes(); 531 else 531 m_writeBuffer.write_32(0); 532 533 if (m_encryption.info()->is_encrypted()) 534 m_encryption.info()->encrypt(m_writeBuffer.end() - 4, 4); 535 536 } else { 532 537 prepare_bitfield(); 538 } 533 539 534 540 m_state = READ_MESSAGE; … … 622 628 // bitfield to send, we need to send a keep-alive now. 623 629 if (m_writePos == m_download->file_list()->bitfield()->size_bytes()) 624 prepare_post_handshake(m_download->file_list()->bitfield()->is_all_unset() );630 prepare_post_handshake(m_download->file_list()->bitfield()->is_all_unset() || m_download->initial_seeding() != NULL); 625 631 626 632 if (m_writeDone)
