Before eMules never did that, so I propose to keep the same by changing code marked with green into 0xFFFFFFFE.
Quote
void CUpDownClient::SendBlockRequests()
{
...
bool bI64Offsets = false;
POSITION pos = m_PendingBlocks_list.GetHeadPosition();
for (uint32 i = 0; i != 3; i++){
if (pos){
Pending_Block_Struct* pending = m_PendingBlocks_list.GetNext(pos);
ASSERT( pending->block->StartOffset <= pending->block->EndOffset );
if (pending->block->StartOffset > 0xFFFFFFFF || pending->block->EndOffset > 0xFFFFFFFF){
bI64Offsets = true;
if (!SupportsLargeFiles()){
ASSERT( false );
SendCancelTransfer();
SetDownloadState(DS_ERROR);
}
break;
}
}
}
...
if (bI64Offsets){
...
}
else{
...
pos = m_PendingBlocks_list.GetHeadPosition();
for (uint32 i = 0; i != 3; i++){
if (pos){
Requested_Block_Struct* block = m_PendingBlocks_list.GetNext(pos)->block;
uint64 endpos = block->EndOffset+1;
data.WriteUInt32((uint32)endpos);
}
}
}
{
...
bool bI64Offsets = false;
POSITION pos = m_PendingBlocks_list.GetHeadPosition();
for (uint32 i = 0; i != 3; i++){
if (pos){
Pending_Block_Struct* pending = m_PendingBlocks_list.GetNext(pos);
ASSERT( pending->block->StartOffset <= pending->block->EndOffset );
if (pending->block->StartOffset > 0xFFFFFFFF || pending->block->EndOffset > 0xFFFFFFFF){
bI64Offsets = true;
if (!SupportsLargeFiles()){
ASSERT( false );
SendCancelTransfer();
SetDownloadState(DS_ERROR);
}
break;
}
}
}
...
if (bI64Offsets){
...
}
else{
...
pos = m_PendingBlocks_list.GetHeadPosition();
for (uint32 i = 0; i != 3; i++){
if (pos){
Requested_Block_Struct* block = m_PendingBlocks_list.GetNext(pos)->block;
uint64 endpos = block->EndOffset+1;
data.WriteUInt32((uint32)endpos);
}
}
}










Sign In
Register

