Skip to content

Commit

Permalink
allow to overwrite IP on IndexTransfer_p.html
Browse files Browse the repository at this point in the history
(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
  • Loading branch information
allo committed Mar 3, 2006
1 parent 8928647 commit f6c80c2
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
4 changes: 4 additions & 0 deletions htroot/IndexTransfer_p.html
Expand Up @@ -23,6 +23,7 @@ <h2>Index Transfer</h2>
<td class="small" >Transfered Words</td>
<td class="small" >Delete<br>Index</td>
<td class="small" >Remote<br>Peer</td>
<td class="small" >Overwrite IP<br />(blank for defaultip)</td>
<td class="small" >Start/Stop Transfer</td>
</tr>
#(running)#
Expand All @@ -45,6 +46,9 @@ <h2>Index Transfer</h2>
#{/hosts}#
</select>
</td>
<td class="small">
<input type="text" name="overwriteIP">
</td>
<td class="small">
<input type="submit" name="startIndexTransfer" value="Start Index Transfer">
</td>
Expand Down
5 changes: 4 additions & 1 deletion htroot/IndexTransfer_p.java
Expand Up @@ -73,7 +73,10 @@ public static serverObjects respond(httpHeader header, serverObjects post, serve
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;
Expand Down

0 comments on commit f6c80c2

Please sign in to comment.