forked from I2P_Developers/i2p.i2p
oops (thanks newkid!)
This commit is contained in:
@@ -557,7 +557,7 @@ public class PeerState {
|
||||
public static String calculateRemoteHostString(byte ip[], int port) {
|
||||
StringBuffer buf = new StringBuffer(ip.length * 4 + 5);
|
||||
for (int i = 0; i < ip.length; i++)
|
||||
buf.append((int)ip[i]).append('.');
|
||||
buf.append(ip[i]&0xFF).append('.');
|
||||
buf.append(port);
|
||||
return buf.toString();
|
||||
}
|
||||
|
@@ -567,10 +567,7 @@ public class UDPTransport extends TransportImpl implements TimedWeightedPriority
|
||||
buf.append("\">");
|
||||
byte ip[] = peer.getRemoteIP();
|
||||
for (int j = 0; j < ip.length; j++) {
|
||||
if (ip[j] < 0)
|
||||
buf.append(ip[j] + 255);
|
||||
else
|
||||
buf.append(ip[j]);
|
||||
buf.append(ip[j] & 0xFF);
|
||||
if (j + 1 < ip.length)
|
||||
buf.append('.');
|
||||
}
|
||||
|
Reference in New Issue
Block a user