diff --git a/apps/sam/java/src/net/i2p/sam/SAMv1Handler.java b/apps/sam/java/src/net/i2p/sam/SAMv1Handler.java index 3c5c3b510e8f4130de3ce4f8ebcdf143d159ed4c..d4fd7350b025f6b438b30158b5b3f5ee267ea420 100644 --- a/apps/sam/java/src/net/i2p/sam/SAMv1Handler.java +++ b/apps/sam/java/src/net/i2p/sam/SAMv1Handler.java @@ -108,7 +108,7 @@ public class SAMv1Handler extends SAMHandler implements SAMRawReceiver, SAMDatag break; } - msg = buf.toString("ISO-8859-1"); + msg = buf.toString("ISO-8859-1").trim(); if (_log.shouldLog(Log.DEBUG)) { _log.debug("New message received: " + msg); } @@ -230,7 +230,7 @@ public class SAMv1Handler extends SAMHandler implements SAMRawReceiver, SAMDatag } if (!dir.equals("CREATE") && !dir.equals("RECEIVE") && !dir.equals("BOTH")) { - _log.debug("Unknow DIRECTION parameter value: " + dir); + _log.debug("Unknow DIRECTION parameter value: [" + dir + "]"); return false; } props.remove("DIRECTION");