#include "main.h" FsFile* LoadFile(unsigned long hash); void StartFileTransfer(LocalData* pLir) { //Load the file data unsigned long hash=pLir->hashes.front(); FsFile* pFile=LoadFile(hash); if(pFile==NULL) { gpFileServer->Kick(pLir->networkId); return; } //Send the file information packet CompiledPacket pck; pck.AddByte(pLir->wtfByte); pck.AddByte(FS_DETAILS); pck.AddShort(20); pck.AddLong(hash); pck.AddLong(pFile->decompressedSize); pck.AddLong(pFile->compressedSize); pck.AddLong(pFile->crc32); Util::SendCompiledPacket(&pck, pLir->networkId, gpFileServer); gCoreLog.debug("%u - Receiving File: 0x%X", pLir->networkId, hash); //gCoreLog.notice("Comp - %u", pFile->compressedSize); //gCoreLog.notice("Decomp - %u", pFile->decompressedSize); //We are sending data and our data is starting at file position zero pLir->sendingData=true; pLir->filePos=0; //Queue a send and set our segment size to the original size pLir->queuedSends=1; }