Skip to content
Browse files

Use cloneAndDropSubMessage -> fix most of the "Messages should NOT be…

… relayed as-is" spam.
  • Loading branch information...
1 parent cff8b17 commit 0f4f49c86234d1cb63793fc17f6afdbd99657ddd @toad toad committed
Showing with 3 additions and 0 deletions.
  1. +3 −0 src/freenet/node/LocationManager.java
View
3 src/freenet/node/LocationManager.java
@@ -1116,6 +1116,7 @@ public boolean handleSwapRejected(Message m, PeerNode source) {
removeRecentlyForwardedItem(item);
item.lastMessageTime = System.currentTimeMillis();
if(logMINOR) Logger.minor(this, "Forwarding SwapRejected "+uid+" from "+source+" to "+item.requestSender);
+ m = m.cloneAndDropSubMessages();
// Returning to source - use incomingID
m.set(DMT.UID, item.incomingID);
try {
@@ -1142,6 +1143,7 @@ public boolean handleSwapCommit(Message m, PeerNode source) {
}
item.lastMessageTime = System.currentTimeMillis();
if(logMINOR) Logger.minor(this, "Forwarding SwapCommit "+uid+ ',' +item.outgoingID+" from "+source+" to "+item.routedTo);
+ m = m.cloneAndDropSubMessages();
// Sending onwards - use outgoing ID
m.set(DMT.UID, item.outgoingID);
try {
@@ -1179,6 +1181,7 @@ public boolean handleSwapComplete(Message m, PeerNode source) {
return true;
}
if(logMINOR) Logger.minor(this, "Forwarding SwapComplete "+uid+" from "+source+" to "+item.requestSender);
+ m = m.cloneAndDropSubMessages();
// Returning to source - use incomingID
m.set(DMT.UID, item.incomingID);
try {

0 comments on commit 0f4f49c

Please sign in to comment.
Something went wrong with that request. Please try again.