diff --git a/src/protocolP2P/ProtocolP2PDatagram.java b/src/protocolP2P/ProtocolP2PDatagram.java index f17cc02..11db2d5 100644 --- a/src/protocolP2P/ProtocolP2PDatagram.java +++ b/src/protocolP2P/ProtocolP2PDatagram.java @@ -10,6 +10,7 @@ import remoteException.NotFound; import remoteException.ProtocolRemoteError; import remoteException.VersionRemoteError; import remoteException.EmptyFile; +import tools.BytesArrayTools; import protocolP2P.Payload; import protocolP2P.RequestResponseCode; import protocolP2P.LoadRequest; @@ -243,7 +244,7 @@ public class ProtocolP2PDatagram { } private int computeCheckSum(byte [] datagram){ - int checksum; + int checksum = 0; for (int i=CHECKSUM_POSITION+2; i