Better hash error handling

This commit is contained in:
Martin Raiber 2012-09-06 16:22:03 +02:00
parent 26bf5a9451
commit b782812ce5

View File

@ -635,6 +635,7 @@ bool FileClient::Reconnect(void)
if(memcmp(hash_func.raw_digest_int(), hash_buf, 16)!=0)
{
Server->Log("Error while downloading file: hash wrong -1", LL_ERROR);
Reconnect();
return ERR_HASH;
}
hash_func.init();
@ -718,6 +719,7 @@ bool FileClient::Reconnect(void)
if(memcmp(hash_func.raw_digest_int(), hash_buf, 16)!=0)
{
Server->Log("Error while downloading file: hash wrong -2", LL_ERROR);
Reconnect();
return ERR_HASH;
}
hash_func.init();