forked from I2P_Developers/i2p.i2p
Dont show firewall warning unless its for real
This commit is contained in:
@ -154,6 +154,18 @@ public class SummaryHelper extends HelperBase {
|
|||||||
else
|
else
|
||||||
return _context.commSystem().countActivePeers();
|
return _context.commSystem().countActivePeers();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Should we warn about a possible firewall problem?
|
||||||
|
*/
|
||||||
|
public boolean showFirewallWarning() {
|
||||||
|
return _context != null &&
|
||||||
|
_context.netDb().isInitialized() &&
|
||||||
|
_context.router().getUptime() > 2*60*1000 &&
|
||||||
|
_context.commSystem().countActivePeers() <= 0 &&
|
||||||
|
_context.netDb().getKnownRouters() > 5;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* How many active identities have we spoken with recently
|
* How many active identities have we spoken with recently
|
||||||
*
|
*
|
||||||
|
@ -92,7 +92,7 @@
|
|||||||
<tr><td align="left"><b>High capacity:</b></td><td align="right"><jsp:getProperty name="helper" property="highCapacityPeers" /></td></tr>
|
<tr><td align="left"><b>High capacity:</b></td><td align="right"><jsp:getProperty name="helper" property="highCapacityPeers" /></td></tr>
|
||||||
<tr><td align="left"><b>Integrated:</b></td><td align="right"><jsp:getProperty name="helper" property="wellIntegratedPeers" /></td></tr>
|
<tr><td align="left"><b>Integrated:</b></td><td align="right"><jsp:getProperty name="helper" property="wellIntegratedPeers" /></td></tr>
|
||||||
<tr><td align="left"><b>Known:</b></td><td align="right"><jsp:getProperty name="helper" property="allPeers" /></td></tr></table><hr><%
|
<tr><td align="left"><b>Known:</b></td><td align="right"><jsp:getProperty name="helper" property="allPeers" /></td></tr></table><hr><%
|
||||||
if (helper.getActivePeers() <= 0) {
|
if (helper.showFirewallWarning()) {
|
||||||
%><h4><a href="config.jsp" target="_top" title="Help with firewall configuration.">Check NAT/firewall</a></h4><%
|
%><h4><a href="config.jsp" target="_top" title="Help with firewall configuration.">Check NAT/firewall</a></h4><%
|
||||||
}
|
}
|
||||||
// If showing the reseed link is allowed
|
// If showing the reseed link is allowed
|
||||||
|
Reference in New Issue
Block a user