All pastes #39364 Raw Edit

Something

public text v1 · immutable
#39364 ·published 2006-02-01 02:00 UTC
rendered paste body
	if (pClient && pClient->GetVBTTags()) {
		tags.push_back(new CTagVarInt(FT_FILESIZE, cur_file->GetFileSize()));
	} else {
		if (!cur_file->IsLargeFile()){
			tags.push_back(new CTagInt32(FT_FILESIZE, cur_file->GetFileSize()));
		} else {
			// Large file
			// we send 2*32 bit tags to servers, but a real 64 bit tag to other clients.
			if (pServer) {
				if (!pServer->SupportsLargeFilesTCP()){
					wxASSERT( false );
					tags.push_back(new CTagInt32(FT_FILESIZE, 0));
				}else {
					tags.push_back(new CTagInt32(FT_FILESIZE, (uint32)cur_file->GetFileSize()));
					tags.push_back(new CTagInt32(FT_FILESIZE_HI, (uint32)(cur_file->GetFileSize() >> 32)));
				}
			} else {
				if (!pClient->SupportsLargeFiles()) {
					wxASSERT( false );
					tags.push_back(new CTagInt32(FT_FILESIZE, 0));
				} else {
					tags.push_back(new CTagInt64(FT_FILESIZE, cur_file->GetFileSize()));
				}
			}		
		}
	}