From f6c80c296f5cd88bab47e8960337df1fb0801b5b Mon Sep 17 00:00:00 2001 From: allo Date: Fri, 3 Mar 2006 14:13:03 +0000 Subject: [PATCH] allow to overwrite IP on IndexTransfer_p.html (so you can transfer to localhost instead of your external IP) git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@1802 6c8d7289-2bf4-0310-a012-ef5d649a1542 --- htroot/IndexTransfer_p.html | 4 ++++ htroot/IndexTransfer_p.java | 5 ++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/htroot/IndexTransfer_p.html b/htroot/IndexTransfer_p.html index cfe8cef89..a1291a2ab 100644 --- a/htroot/IndexTransfer_p.html +++ b/htroot/IndexTransfer_p.html @@ -23,6 +23,7 @@ Transfered Words Delete
Index Remote
Peer +Overwrite IP
(blank for defaultip) Start/Stop Transfer #(running)# @@ -45,6 +46,9 @@ #{/hosts}# + + + diff --git a/htroot/IndexTransfer_p.java b/htroot/IndexTransfer_p.java index 45176b7a6..907a1b22d 100644 --- a/htroot/IndexTransfer_p.java +++ b/htroot/IndexTransfer_p.java @@ -73,7 +73,10 @@ public final class IndexTransfer_p { if (seed == null) { prop.put("running_status","Disconnected peer"); } else { - boolean deleteIndex = post.get("deleteIndex", "0").equals("1"); + boolean deleteIndex = post.get("deleteIndex", "0").equals("1"); + if(prop.containsKey("overwriteIP") && ! ((String)prop.get("overwriteIP")).equals("")){ + seed.setIP((String) prop.get("overwriteIP")); + } switchboard.startTransferWholeIndex(seed,deleteIndex); prop.put("LOCATION",""); return prop;