Official eMule-Board: Fix For Op_Filereqansnofil Handle - Official eMule-Board

Jump to content


Page 1 of 1

Fix For Op_Filereqansnofil Handle The respond packets may differ from the file we're requesting

#1 User is offline   Enig123 

  • Golden eMule
  • PipPipPipPipPipPipPip
  • Group: Members
  • Posts: 553
  • Joined: 22-November 04

Posted 28 November 2015 - 08:19 PM

In ListenSocket.cpp, in the part of handling OP_FILEREQANSNOFIL
						// if that client does not have my file maybe has another different
						// we try to swap to another file ignoring no needed parts files
						switch (client->GetDownloadState())
						{
							case DS_CONNECTED:
							case DS_ONQUEUE:
							case DS_NONEEDEDPARTS:
								/*
								client->DontSwapTo(client->GetRequestFile()); // ZZ:DownloadManager
								*/	//Enig123::reqfile might be different with client->GetRequestFile()
								client->DontSwapTo(reqfile); // ZZ:DownloadManager
								if (!client->SwapToAnotherFile(_T("Source says it doesn't have the file. CClientReqSocket::ProcessPacket()"), true, true, true, NULL, false, false)) { // ZZ:DownloadManager
									theApp.downloadqueue->RemoveSource(client);
								}
							break;
						}
						break;

where some developers, including me, found that the reqfile indicated by the packet somehow can differ from the client->GetRequestFile(). Simply by using reqfile directly can fix this confusion.

This post has been edited by Enig123: 28 November 2015 - 08:21 PM

0

  • Member Options

Page 1 of 1

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users