I2P Address: [http://git.idk.i2p]

Skip to content
Snippets Groups Projects
Commit e5f19c98 authored by zzz's avatar zzz
Browse files

change common corrupt errors to warns

parent d0a969ca
No related branches found
No related tags found
No related merge requests found
...@@ -393,8 +393,8 @@ public class FragmentHandler { ...@@ -393,8 +393,8 @@ public class FragmentHandler {
_log.error("Error receiving fragmented message (corrupt?): " + stringified, ioe); _log.error("Error receiving fragmented message (corrupt?): " + stringified, ioe);
} catch (I2NPMessageException ime) { } catch (I2NPMessageException ime) {
if (stringified == null) stringified = msg.toString(); if (stringified == null) stringified = msg.toString();
if (_log.shouldLog(Log.ERROR)) if (_log.shouldLog(Log.WARN))
_log.error("Error receiving fragmented message (corrupt?): " + stringified, ime); _log.warn("Error receiving fragmented message (corrupt?): " + stringified, ime);
} }
} }
......
...@@ -78,13 +78,13 @@ public class FragmentedMessage { ...@@ -78,13 +78,13 @@ public class FragmentedMessage {
return false; return false;
} }
if (length <= 0) { if (length <= 0) {
if (_log.shouldLog(Log.ERROR)) if (_log.shouldLog(Log.WARN))
_log.error("Length is impossible (" + length + ") for messageId " + messageId); _log.warn("Length is impossible (" + length + ") for messageId " + messageId);
return false; return false;
} }
if (offset + length > payload.length) { if (offset + length > payload.length) {
if (_log.shouldLog(Log.ERROR)) if (_log.shouldLog(Log.WARN))
_log.error("Length is impossible (" + length + "/" + offset + " out of " + payload.length + ") for messageId " + messageId); _log.warn("Length is impossible (" + length + "/" + offset + " out of " + payload.length + ") for messageId " + messageId);
return false; return false;
} }
if (_log.shouldLog(Log.DEBUG)) if (_log.shouldLog(Log.DEBUG))
...@@ -131,13 +131,13 @@ public class FragmentedMessage { ...@@ -131,13 +131,13 @@ public class FragmentedMessage {
return false; return false;
} }
if (length <= 0) { if (length <= 0) {
if (_log.shouldLog(Log.ERROR)) if (_log.shouldLog(Log.WARN))
_log.error("Length is impossible (" + length + ") for messageId " + messageId); _log.warn("Length is impossible (" + length + ") for messageId " + messageId);
return false; return false;
} }
if (offset + length > payload.length) { if (offset + length > payload.length) {
if (_log.shouldLog(Log.ERROR)) if (_log.shouldLog(Log.WARN))
_log.error("Length is impossible (" + length + "/" + offset + " out of " + payload.length + ") for messageId " + messageId); _log.warn("Length is impossible (" + length + "/" + offset + " out of " + payload.length + ") for messageId " + messageId);
return false; return false;
} }
if (_log.shouldLog(Log.DEBUG)) if (_log.shouldLog(Log.DEBUG))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment