~grimler/Heimdall

714b75f1f6b5eb1db3228664eea92d4c140d1c14 — Henrik Grimler 2 years ago d81e0f5 first-package-hack
BridgeManager: implement packet response hack by iamantony
1 files changed, 9 insertions(+), 6 deletions(-)

M heimdall/source/BridgeManager.cpp
M heimdall/source/BridgeManager.cpp => heimdall/source/BridgeManager.cpp +9 -6
@@ 1088,12 1088,15 @@ bool BridgeManager::SendFile(FILE *file, unsigned int destination, unsigned int 

			delete sendFilePartResponse;

			if (!success)
			if (filePartIndex == 0)
			{
				Interface::PrintErrorSameLine("\n");
				Interface::PrintError("Failed to receive file part response!\n");

				for (int retry = 0; retry < 4; retry++)
				// Hack
				success = true;
				receivedPartIndex = filePartIndex;
			}
			else
			{
				for (int retry = 0; retry < 4; ++retry)
				{
					Interface::PrintErrorSameLine("\n");
					Interface::PrintError("Retrying...");


@@ 1106,7 1109,7 @@ bool BridgeManager::SendFile(FILE *file, unsigned int destination, unsigned int 
					if (!success)
					{
						Interface::PrintErrorSameLine("\n");
						Interface::PrintError("Failed to send file part packet!\n");
						Interface::PrintError("Failed to send file part packet 2!\n");
						return (false);
					}