Skip to content

Distributed Peer-to-Peer Web Search Engine and Intranet Search Appliance

fix RuntimeException in ConfigRobotsTxt_p in intranet mode due to getIP returning null, by removing redundant property setting of "clientname" which is globally set by template engine

reger19509438d9a0
diff --git a/htroot/ConfigRobotsTxt_p.java b/htroot/ConfigRobotsTxt_p.java
index 0f7e254db..bf140e8c2 100644
--- a/htroot/ConfigRobotsTxt_p.java
+++ b/htroot/ConfigRobotsTxt_p.java
@@ -43,8 +43,9 @@ public class ConfigRobotsTxt_p {
final Switchboard sb = (Switchboard) env;
final servletProperties prop = new servletProperties();
- final RobotsTxtConfig rbc = ((Switchboard)env).robotstxtConfig;
- prop.put("clientname", sb.peers.mySeed().getPublicAddress(sb.peers.mySeed().getIP()));
+ final RobotsTxtConfig rbc = sb.robotstxtConfig;
+ // globaly overwitten by template engine (removed to avoid risk of NPE in intranet mode)
+ // prop.put("clientname", sb.peers.mySeed().getPublicAddress(sb.peers.mySeed().getIP()));
if (post != null) {
if (post.containsKey("save")) {